##// END OF EJS Templates
auto-upgrade: add an option to silence the dirstate-v2 message...
marmoute -
r50236:b38f5063 default
parent child Browse files
Show More
@@ -1,2815 +1,2821 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
9 9 import functools
10 10 import re
11 11
12 12 from . import (
13 13 encoding,
14 14 error,
15 15 )
16 16
17 17
18 18 def loadconfigtable(ui, extname, configtable):
19 19 """update config item known to the ui with the extension ones"""
20 20 for section, items in sorted(configtable.items()):
21 21 knownitems = ui._knownconfig.setdefault(section, itemregister())
22 22 knownkeys = set(knownitems)
23 23 newkeys = set(items)
24 24 for key in sorted(knownkeys & newkeys):
25 25 msg = b"extension '%s' overwrite config item '%s.%s'"
26 26 msg %= (extname, section, key)
27 27 ui.develwarn(msg, config=b'warn-config')
28 28
29 29 knownitems.update(items)
30 30
31 31
32 32 class configitem:
33 33 """represent a known config item
34 34
35 35 :section: the official config section where to find this item,
36 36 :name: the official name within the section,
37 37 :default: default value for this item,
38 38 :alias: optional list of tuples as alternatives,
39 39 :generic: this is a generic definition, match name using regular expression.
40 40 """
41 41
42 42 def __init__(
43 43 self,
44 44 section,
45 45 name,
46 46 default=None,
47 47 alias=(),
48 48 generic=False,
49 49 priority=0,
50 50 experimental=False,
51 51 ):
52 52 self.section = section
53 53 self.name = name
54 54 self.default = default
55 55 self.alias = list(alias)
56 56 self.generic = generic
57 57 self.priority = priority
58 58 self.experimental = experimental
59 59 self._re = None
60 60 if generic:
61 61 self._re = re.compile(self.name)
62 62
63 63
64 64 class itemregister(dict):
65 65 """A specialized dictionary that can handle wild-card selection"""
66 66
67 67 def __init__(self):
68 68 super(itemregister, self).__init__()
69 69 self._generics = set()
70 70
71 71 def update(self, other):
72 72 super(itemregister, self).update(other)
73 73 self._generics.update(other._generics)
74 74
75 75 def __setitem__(self, key, item):
76 76 super(itemregister, self).__setitem__(key, item)
77 77 if item.generic:
78 78 self._generics.add(item)
79 79
80 80 def get(self, key):
81 81 baseitem = super(itemregister, self).get(key)
82 82 if baseitem is not None and not baseitem.generic:
83 83 return baseitem
84 84
85 85 # search for a matching generic item
86 86 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
87 87 for item in generics:
88 88 # we use 'match' instead of 'search' to make the matching simpler
89 89 # for people unfamiliar with regular expression. Having the match
90 90 # rooted to the start of the string will produce less surprising
91 91 # result for user writing simple regex for sub-attribute.
92 92 #
93 93 # For example using "color\..*" match produces an unsurprising
94 94 # result, while using search could suddenly match apparently
95 95 # unrelated configuration that happens to contains "color."
96 96 # anywhere. This is a tradeoff where we favor requiring ".*" on
97 97 # some match to avoid the need to prefix most pattern with "^".
98 98 # The "^" seems more error prone.
99 99 if item._re.match(key):
100 100 return item
101 101
102 102 return None
103 103
104 104
105 105 coreitems = {}
106 106
107 107
108 108 def _register(configtable, *args, **kwargs):
109 109 item = configitem(*args, **kwargs)
110 110 section = configtable.setdefault(item.section, itemregister())
111 111 if item.name in section:
112 112 msg = b"duplicated config item registration for '%s.%s'"
113 113 raise error.ProgrammingError(msg % (item.section, item.name))
114 114 section[item.name] = item
115 115
116 116
117 117 # special value for case where the default is derived from other values
118 118 dynamicdefault = object()
119 119
120 120 # Registering actual config items
121 121
122 122
123 123 def getitemregister(configtable):
124 124 f = functools.partial(_register, configtable)
125 125 # export pseudo enum as configitem.*
126 126 f.dynamicdefault = dynamicdefault
127 127 return f
128 128
129 129
130 130 coreconfigitem = getitemregister(coreitems)
131 131
132 132
133 133 def _registerdiffopts(section, configprefix=b''):
134 134 coreconfigitem(
135 135 section,
136 136 configprefix + b'nodates',
137 137 default=False,
138 138 )
139 139 coreconfigitem(
140 140 section,
141 141 configprefix + b'showfunc',
142 142 default=False,
143 143 )
144 144 coreconfigitem(
145 145 section,
146 146 configprefix + b'unified',
147 147 default=None,
148 148 )
149 149 coreconfigitem(
150 150 section,
151 151 configprefix + b'git',
152 152 default=False,
153 153 )
154 154 coreconfigitem(
155 155 section,
156 156 configprefix + b'ignorews',
157 157 default=False,
158 158 )
159 159 coreconfigitem(
160 160 section,
161 161 configprefix + b'ignorewsamount',
162 162 default=False,
163 163 )
164 164 coreconfigitem(
165 165 section,
166 166 configprefix + b'ignoreblanklines',
167 167 default=False,
168 168 )
169 169 coreconfigitem(
170 170 section,
171 171 configprefix + b'ignorewseol',
172 172 default=False,
173 173 )
174 174 coreconfigitem(
175 175 section,
176 176 configprefix + b'nobinary',
177 177 default=False,
178 178 )
179 179 coreconfigitem(
180 180 section,
181 181 configprefix + b'noprefix',
182 182 default=False,
183 183 )
184 184 coreconfigitem(
185 185 section,
186 186 configprefix + b'word-diff',
187 187 default=False,
188 188 )
189 189
190 190
191 191 coreconfigitem(
192 192 b'alias',
193 193 b'.*',
194 194 default=dynamicdefault,
195 195 generic=True,
196 196 )
197 197 coreconfigitem(
198 198 b'auth',
199 199 b'cookiefile',
200 200 default=None,
201 201 )
202 202 _registerdiffopts(section=b'annotate')
203 203 # bookmarks.pushing: internal hack for discovery
204 204 coreconfigitem(
205 205 b'bookmarks',
206 206 b'pushing',
207 207 default=list,
208 208 )
209 209 # bundle.mainreporoot: internal hack for bundlerepo
210 210 coreconfigitem(
211 211 b'bundle',
212 212 b'mainreporoot',
213 213 default=b'',
214 214 )
215 215 coreconfigitem(
216 216 b'censor',
217 217 b'policy',
218 218 default=b'abort',
219 219 experimental=True,
220 220 )
221 221 coreconfigitem(
222 222 b'chgserver',
223 223 b'idletimeout',
224 224 default=3600,
225 225 )
226 226 coreconfigitem(
227 227 b'chgserver',
228 228 b'skiphash',
229 229 default=False,
230 230 )
231 231 coreconfigitem(
232 232 b'cmdserver',
233 233 b'log',
234 234 default=None,
235 235 )
236 236 coreconfigitem(
237 237 b'cmdserver',
238 238 b'max-log-files',
239 239 default=7,
240 240 )
241 241 coreconfigitem(
242 242 b'cmdserver',
243 243 b'max-log-size',
244 244 default=b'1 MB',
245 245 )
246 246 coreconfigitem(
247 247 b'cmdserver',
248 248 b'max-repo-cache',
249 249 default=0,
250 250 experimental=True,
251 251 )
252 252 coreconfigitem(
253 253 b'cmdserver',
254 254 b'message-encodings',
255 255 default=list,
256 256 )
257 257 coreconfigitem(
258 258 b'cmdserver',
259 259 b'track-log',
260 260 default=lambda: [b'chgserver', b'cmdserver', b'repocache'],
261 261 )
262 262 coreconfigitem(
263 263 b'cmdserver',
264 264 b'shutdown-on-interrupt',
265 265 default=True,
266 266 )
267 267 coreconfigitem(
268 268 b'color',
269 269 b'.*',
270 270 default=None,
271 271 generic=True,
272 272 )
273 273 coreconfigitem(
274 274 b'color',
275 275 b'mode',
276 276 default=b'auto',
277 277 )
278 278 coreconfigitem(
279 279 b'color',
280 280 b'pagermode',
281 281 default=dynamicdefault,
282 282 )
283 283 coreconfigitem(
284 284 b'command-templates',
285 285 b'graphnode',
286 286 default=None,
287 287 alias=[(b'ui', b'graphnodetemplate')],
288 288 )
289 289 coreconfigitem(
290 290 b'command-templates',
291 291 b'log',
292 292 default=None,
293 293 alias=[(b'ui', b'logtemplate')],
294 294 )
295 295 coreconfigitem(
296 296 b'command-templates',
297 297 b'mergemarker',
298 298 default=(
299 299 b'{node|short} '
300 300 b'{ifeq(tags, "tip", "", '
301 301 b'ifeq(tags, "", "", "{tags} "))}'
302 302 b'{if(bookmarks, "{bookmarks} ")}'
303 303 b'{ifeq(branch, "default", "", "{branch} ")}'
304 304 b'- {author|user}: {desc|firstline}'
305 305 ),
306 306 alias=[(b'ui', b'mergemarkertemplate')],
307 307 )
308 308 coreconfigitem(
309 309 b'command-templates',
310 310 b'pre-merge-tool-output',
311 311 default=None,
312 312 alias=[(b'ui', b'pre-merge-tool-output-template')],
313 313 )
314 314 coreconfigitem(
315 315 b'command-templates',
316 316 b'oneline-summary',
317 317 default=None,
318 318 )
319 319 coreconfigitem(
320 320 b'command-templates',
321 321 b'oneline-summary.*',
322 322 default=dynamicdefault,
323 323 generic=True,
324 324 )
325 325 _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.')
326 326 coreconfigitem(
327 327 b'commands',
328 328 b'commit.post-status',
329 329 default=False,
330 330 )
331 331 coreconfigitem(
332 332 b'commands',
333 333 b'grep.all-files',
334 334 default=False,
335 335 experimental=True,
336 336 )
337 337 coreconfigitem(
338 338 b'commands',
339 339 b'merge.require-rev',
340 340 default=False,
341 341 )
342 342 coreconfigitem(
343 343 b'commands',
344 344 b'push.require-revs',
345 345 default=False,
346 346 )
347 347 coreconfigitem(
348 348 b'commands',
349 349 b'resolve.confirm',
350 350 default=False,
351 351 )
352 352 coreconfigitem(
353 353 b'commands',
354 354 b'resolve.explicit-re-merge',
355 355 default=False,
356 356 )
357 357 coreconfigitem(
358 358 b'commands',
359 359 b'resolve.mark-check',
360 360 default=b'none',
361 361 )
362 362 _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.')
363 363 coreconfigitem(
364 364 b'commands',
365 365 b'show.aliasprefix',
366 366 default=list,
367 367 )
368 368 coreconfigitem(
369 369 b'commands',
370 370 b'status.relative',
371 371 default=False,
372 372 )
373 373 coreconfigitem(
374 374 b'commands',
375 375 b'status.skipstates',
376 376 default=[],
377 377 experimental=True,
378 378 )
379 379 coreconfigitem(
380 380 b'commands',
381 381 b'status.terse',
382 382 default=b'',
383 383 )
384 384 coreconfigitem(
385 385 b'commands',
386 386 b'status.verbose',
387 387 default=False,
388 388 )
389 389 coreconfigitem(
390 390 b'commands',
391 391 b'update.check',
392 392 default=None,
393 393 )
394 394 coreconfigitem(
395 395 b'commands',
396 396 b'update.requiredest',
397 397 default=False,
398 398 )
399 399 coreconfigitem(
400 400 b'committemplate',
401 401 b'.*',
402 402 default=None,
403 403 generic=True,
404 404 )
405 405 coreconfigitem(
406 406 b'convert',
407 407 b'bzr.saverev',
408 408 default=True,
409 409 )
410 410 coreconfigitem(
411 411 b'convert',
412 412 b'cvsps.cache',
413 413 default=True,
414 414 )
415 415 coreconfigitem(
416 416 b'convert',
417 417 b'cvsps.fuzz',
418 418 default=60,
419 419 )
420 420 coreconfigitem(
421 421 b'convert',
422 422 b'cvsps.logencoding',
423 423 default=None,
424 424 )
425 425 coreconfigitem(
426 426 b'convert',
427 427 b'cvsps.mergefrom',
428 428 default=None,
429 429 )
430 430 coreconfigitem(
431 431 b'convert',
432 432 b'cvsps.mergeto',
433 433 default=None,
434 434 )
435 435 coreconfigitem(
436 436 b'convert',
437 437 b'git.committeractions',
438 438 default=lambda: [b'messagedifferent'],
439 439 )
440 440 coreconfigitem(
441 441 b'convert',
442 442 b'git.extrakeys',
443 443 default=list,
444 444 )
445 445 coreconfigitem(
446 446 b'convert',
447 447 b'git.findcopiesharder',
448 448 default=False,
449 449 )
450 450 coreconfigitem(
451 451 b'convert',
452 452 b'git.remoteprefix',
453 453 default=b'remote',
454 454 )
455 455 coreconfigitem(
456 456 b'convert',
457 457 b'git.renamelimit',
458 458 default=400,
459 459 )
460 460 coreconfigitem(
461 461 b'convert',
462 462 b'git.saverev',
463 463 default=True,
464 464 )
465 465 coreconfigitem(
466 466 b'convert',
467 467 b'git.similarity',
468 468 default=50,
469 469 )
470 470 coreconfigitem(
471 471 b'convert',
472 472 b'git.skipsubmodules',
473 473 default=False,
474 474 )
475 475 coreconfigitem(
476 476 b'convert',
477 477 b'hg.clonebranches',
478 478 default=False,
479 479 )
480 480 coreconfigitem(
481 481 b'convert',
482 482 b'hg.ignoreerrors',
483 483 default=False,
484 484 )
485 485 coreconfigitem(
486 486 b'convert',
487 487 b'hg.preserve-hash',
488 488 default=False,
489 489 )
490 490 coreconfigitem(
491 491 b'convert',
492 492 b'hg.revs',
493 493 default=None,
494 494 )
495 495 coreconfigitem(
496 496 b'convert',
497 497 b'hg.saverev',
498 498 default=False,
499 499 )
500 500 coreconfigitem(
501 501 b'convert',
502 502 b'hg.sourcename',
503 503 default=None,
504 504 )
505 505 coreconfigitem(
506 506 b'convert',
507 507 b'hg.startrev',
508 508 default=None,
509 509 )
510 510 coreconfigitem(
511 511 b'convert',
512 512 b'hg.tagsbranch',
513 513 default=b'default',
514 514 )
515 515 coreconfigitem(
516 516 b'convert',
517 517 b'hg.usebranchnames',
518 518 default=True,
519 519 )
520 520 coreconfigitem(
521 521 b'convert',
522 522 b'ignoreancestorcheck',
523 523 default=False,
524 524 experimental=True,
525 525 )
526 526 coreconfigitem(
527 527 b'convert',
528 528 b'localtimezone',
529 529 default=False,
530 530 )
531 531 coreconfigitem(
532 532 b'convert',
533 533 b'p4.encoding',
534 534 default=dynamicdefault,
535 535 )
536 536 coreconfigitem(
537 537 b'convert',
538 538 b'p4.startrev',
539 539 default=0,
540 540 )
541 541 coreconfigitem(
542 542 b'convert',
543 543 b'skiptags',
544 544 default=False,
545 545 )
546 546 coreconfigitem(
547 547 b'convert',
548 548 b'svn.debugsvnlog',
549 549 default=True,
550 550 )
551 551 coreconfigitem(
552 552 b'convert',
553 553 b'svn.trunk',
554 554 default=None,
555 555 )
556 556 coreconfigitem(
557 557 b'convert',
558 558 b'svn.tags',
559 559 default=None,
560 560 )
561 561 coreconfigitem(
562 562 b'convert',
563 563 b'svn.branches',
564 564 default=None,
565 565 )
566 566 coreconfigitem(
567 567 b'convert',
568 568 b'svn.startrev',
569 569 default=0,
570 570 )
571 571 coreconfigitem(
572 572 b'convert',
573 573 b'svn.dangerous-set-commit-dates',
574 574 default=False,
575 575 )
576 576 coreconfigitem(
577 577 b'debug',
578 578 b'dirstate.delaywrite',
579 579 default=0,
580 580 )
581 581 coreconfigitem(
582 582 b'debug',
583 583 b'revlog.verifyposition.changelog',
584 584 default=b'',
585 585 )
586 586 coreconfigitem(
587 587 b'debug',
588 588 b'revlog.debug-delta',
589 589 default=False,
590 590 )
591 591 coreconfigitem(
592 592 b'defaults',
593 593 b'.*',
594 594 default=None,
595 595 generic=True,
596 596 )
597 597 coreconfigitem(
598 598 b'devel',
599 599 b'all-warnings',
600 600 default=False,
601 601 )
602 602 coreconfigitem(
603 603 b'devel',
604 604 b'bundle2.debug',
605 605 default=False,
606 606 )
607 607 coreconfigitem(
608 608 b'devel',
609 609 b'bundle.delta',
610 610 default=b'',
611 611 )
612 612 coreconfigitem(
613 613 b'devel',
614 614 b'cache-vfs',
615 615 default=None,
616 616 )
617 617 coreconfigitem(
618 618 b'devel',
619 619 b'check-locks',
620 620 default=False,
621 621 )
622 622 coreconfigitem(
623 623 b'devel',
624 624 b'check-relroot',
625 625 default=False,
626 626 )
627 627 # Track copy information for all file, not just "added" one (very slow)
628 628 coreconfigitem(
629 629 b'devel',
630 630 b'copy-tracing.trace-all-files',
631 631 default=False,
632 632 )
633 633 coreconfigitem(
634 634 b'devel',
635 635 b'default-date',
636 636 default=None,
637 637 )
638 638 coreconfigitem(
639 639 b'devel',
640 640 b'deprec-warn',
641 641 default=False,
642 642 )
643 643 coreconfigitem(
644 644 b'devel',
645 645 b'disableloaddefaultcerts',
646 646 default=False,
647 647 )
648 648 coreconfigitem(
649 649 b'devel',
650 650 b'warn-empty-changegroup',
651 651 default=False,
652 652 )
653 653 coreconfigitem(
654 654 b'devel',
655 655 b'legacy.exchange',
656 656 default=list,
657 657 )
658 658 # When True, revlogs use a special reference version of the nodemap, that is not
659 659 # performant but is "known" to behave properly.
660 660 coreconfigitem(
661 661 b'devel',
662 662 b'persistent-nodemap',
663 663 default=False,
664 664 )
665 665 coreconfigitem(
666 666 b'devel',
667 667 b'servercafile',
668 668 default=b'',
669 669 )
670 670 coreconfigitem(
671 671 b'devel',
672 672 b'serverexactprotocol',
673 673 default=b'',
674 674 )
675 675 coreconfigitem(
676 676 b'devel',
677 677 b'serverrequirecert',
678 678 default=False,
679 679 )
680 680 coreconfigitem(
681 681 b'devel',
682 682 b'strip-obsmarkers',
683 683 default=True,
684 684 )
685 685 coreconfigitem(
686 686 b'devel',
687 687 b'warn-config',
688 688 default=None,
689 689 )
690 690 coreconfigitem(
691 691 b'devel',
692 692 b'warn-config-default',
693 693 default=None,
694 694 )
695 695 coreconfigitem(
696 696 b'devel',
697 697 b'user.obsmarker',
698 698 default=None,
699 699 )
700 700 coreconfigitem(
701 701 b'devel',
702 702 b'warn-config-unknown',
703 703 default=None,
704 704 )
705 705 coreconfigitem(
706 706 b'devel',
707 707 b'debug.copies',
708 708 default=False,
709 709 )
710 710 coreconfigitem(
711 711 b'devel',
712 712 b'copy-tracing.multi-thread',
713 713 default=True,
714 714 )
715 715 coreconfigitem(
716 716 b'devel',
717 717 b'debug.extensions',
718 718 default=False,
719 719 )
720 720 coreconfigitem(
721 721 b'devel',
722 722 b'debug.repo-filters',
723 723 default=False,
724 724 )
725 725 coreconfigitem(
726 726 b'devel',
727 727 b'debug.peer-request',
728 728 default=False,
729 729 )
730 730 # If discovery.exchange-heads is False, the discovery will not start with
731 731 # remote head fetching and local head querying.
732 732 coreconfigitem(
733 733 b'devel',
734 734 b'discovery.exchange-heads',
735 735 default=True,
736 736 )
737 737 # If discovery.grow-sample is False, the sample size used in set discovery will
738 738 # not be increased through the process
739 739 coreconfigitem(
740 740 b'devel',
741 741 b'discovery.grow-sample',
742 742 default=True,
743 743 )
744 744 # When discovery.grow-sample.dynamic is True, the default, the sample size is
745 745 # adapted to the shape of the undecided set (it is set to the max of:
746 746 # <target-size>, len(roots(undecided)), len(heads(undecided)
747 747 coreconfigitem(
748 748 b'devel',
749 749 b'discovery.grow-sample.dynamic',
750 750 default=True,
751 751 )
752 752 # discovery.grow-sample.rate control the rate at which the sample grow
753 753 coreconfigitem(
754 754 b'devel',
755 755 b'discovery.grow-sample.rate',
756 756 default=1.05,
757 757 )
758 758 # If discovery.randomize is False, random sampling during discovery are
759 759 # deterministic. It is meant for integration tests.
760 760 coreconfigitem(
761 761 b'devel',
762 762 b'discovery.randomize',
763 763 default=True,
764 764 )
765 765 # Control the initial size of the discovery sample
766 766 coreconfigitem(
767 767 b'devel',
768 768 b'discovery.sample-size',
769 769 default=200,
770 770 )
771 771 # Control the initial size of the discovery for initial change
772 772 coreconfigitem(
773 773 b'devel',
774 774 b'discovery.sample-size.initial',
775 775 default=100,
776 776 )
777 777 _registerdiffopts(section=b'diff')
778 778 coreconfigitem(
779 779 b'diff',
780 780 b'merge',
781 781 default=False,
782 782 experimental=True,
783 783 )
784 784 coreconfigitem(
785 785 b'email',
786 786 b'bcc',
787 787 default=None,
788 788 )
789 789 coreconfigitem(
790 790 b'email',
791 791 b'cc',
792 792 default=None,
793 793 )
794 794 coreconfigitem(
795 795 b'email',
796 796 b'charsets',
797 797 default=list,
798 798 )
799 799 coreconfigitem(
800 800 b'email',
801 801 b'from',
802 802 default=None,
803 803 )
804 804 coreconfigitem(
805 805 b'email',
806 806 b'method',
807 807 default=b'smtp',
808 808 )
809 809 coreconfigitem(
810 810 b'email',
811 811 b'reply-to',
812 812 default=None,
813 813 )
814 814 coreconfigitem(
815 815 b'email',
816 816 b'to',
817 817 default=None,
818 818 )
819 819 coreconfigitem(
820 820 b'experimental',
821 821 b'archivemetatemplate',
822 822 default=dynamicdefault,
823 823 )
824 824 coreconfigitem(
825 825 b'experimental',
826 826 b'auto-publish',
827 827 default=b'publish',
828 828 )
829 829 coreconfigitem(
830 830 b'experimental',
831 831 b'bundle-phases',
832 832 default=False,
833 833 )
834 834 coreconfigitem(
835 835 b'experimental',
836 836 b'bundle2-advertise',
837 837 default=True,
838 838 )
839 839 coreconfigitem(
840 840 b'experimental',
841 841 b'bundle2-output-capture',
842 842 default=False,
843 843 )
844 844 coreconfigitem(
845 845 b'experimental',
846 846 b'bundle2.pushback',
847 847 default=False,
848 848 )
849 849 coreconfigitem(
850 850 b'experimental',
851 851 b'bundle2lazylocking',
852 852 default=False,
853 853 )
854 854 coreconfigitem(
855 855 b'experimental',
856 856 b'bundlecomplevel',
857 857 default=None,
858 858 )
859 859 coreconfigitem(
860 860 b'experimental',
861 861 b'bundlecomplevel.bzip2',
862 862 default=None,
863 863 )
864 864 coreconfigitem(
865 865 b'experimental',
866 866 b'bundlecomplevel.gzip',
867 867 default=None,
868 868 )
869 869 coreconfigitem(
870 870 b'experimental',
871 871 b'bundlecomplevel.none',
872 872 default=None,
873 873 )
874 874 coreconfigitem(
875 875 b'experimental',
876 876 b'bundlecomplevel.zstd',
877 877 default=None,
878 878 )
879 879 coreconfigitem(
880 880 b'experimental',
881 881 b'bundlecompthreads',
882 882 default=None,
883 883 )
884 884 coreconfigitem(
885 885 b'experimental',
886 886 b'bundlecompthreads.bzip2',
887 887 default=None,
888 888 )
889 889 coreconfigitem(
890 890 b'experimental',
891 891 b'bundlecompthreads.gzip',
892 892 default=None,
893 893 )
894 894 coreconfigitem(
895 895 b'experimental',
896 896 b'bundlecompthreads.none',
897 897 default=None,
898 898 )
899 899 coreconfigitem(
900 900 b'experimental',
901 901 b'bundlecompthreads.zstd',
902 902 default=None,
903 903 )
904 904 coreconfigitem(
905 905 b'experimental',
906 906 b'changegroup3',
907 907 default=False,
908 908 )
909 909 coreconfigitem(
910 910 b'experimental',
911 911 b'changegroup4',
912 912 default=False,
913 913 )
914 914 coreconfigitem(
915 915 b'experimental',
916 916 b'cleanup-as-archived',
917 917 default=False,
918 918 )
919 919 coreconfigitem(
920 920 b'experimental',
921 921 b'clientcompressionengines',
922 922 default=list,
923 923 )
924 924 coreconfigitem(
925 925 b'experimental',
926 926 b'copytrace',
927 927 default=b'on',
928 928 )
929 929 coreconfigitem(
930 930 b'experimental',
931 931 b'copytrace.movecandidateslimit',
932 932 default=100,
933 933 )
934 934 coreconfigitem(
935 935 b'experimental',
936 936 b'copytrace.sourcecommitlimit',
937 937 default=100,
938 938 )
939 939 coreconfigitem(
940 940 b'experimental',
941 941 b'copies.read-from',
942 942 default=b"filelog-only",
943 943 )
944 944 coreconfigitem(
945 945 b'experimental',
946 946 b'copies.write-to',
947 947 default=b'filelog-only',
948 948 )
949 949 coreconfigitem(
950 950 b'experimental',
951 951 b'crecordtest',
952 952 default=None,
953 953 )
954 954 coreconfigitem(
955 955 b'experimental',
956 956 b'directaccess',
957 957 default=False,
958 958 )
959 959 coreconfigitem(
960 960 b'experimental',
961 961 b'directaccess.revnums',
962 962 default=False,
963 963 )
964 964 coreconfigitem(
965 965 b'experimental',
966 966 b'editortmpinhg',
967 967 default=False,
968 968 )
969 969 coreconfigitem(
970 970 b'experimental',
971 971 b'evolution',
972 972 default=list,
973 973 )
974 974 coreconfigitem(
975 975 b'experimental',
976 976 b'evolution.allowdivergence',
977 977 default=False,
978 978 alias=[(b'experimental', b'allowdivergence')],
979 979 )
980 980 coreconfigitem(
981 981 b'experimental',
982 982 b'evolution.allowunstable',
983 983 default=None,
984 984 )
985 985 coreconfigitem(
986 986 b'experimental',
987 987 b'evolution.createmarkers',
988 988 default=None,
989 989 )
990 990 coreconfigitem(
991 991 b'experimental',
992 992 b'evolution.effect-flags',
993 993 default=True,
994 994 alias=[(b'experimental', b'effect-flags')],
995 995 )
996 996 coreconfigitem(
997 997 b'experimental',
998 998 b'evolution.exchange',
999 999 default=None,
1000 1000 )
1001 1001 coreconfigitem(
1002 1002 b'experimental',
1003 1003 b'evolution.bundle-obsmarker',
1004 1004 default=False,
1005 1005 )
1006 1006 coreconfigitem(
1007 1007 b'experimental',
1008 1008 b'evolution.bundle-obsmarker:mandatory',
1009 1009 default=True,
1010 1010 )
1011 1011 coreconfigitem(
1012 1012 b'experimental',
1013 1013 b'log.topo',
1014 1014 default=False,
1015 1015 )
1016 1016 coreconfigitem(
1017 1017 b'experimental',
1018 1018 b'evolution.report-instabilities',
1019 1019 default=True,
1020 1020 )
1021 1021 coreconfigitem(
1022 1022 b'experimental',
1023 1023 b'evolution.track-operation',
1024 1024 default=True,
1025 1025 )
1026 1026 # repo-level config to exclude a revset visibility
1027 1027 #
1028 1028 # The target use case is to use `share` to expose different subset of the same
1029 1029 # repository, especially server side. See also `server.view`.
1030 1030 coreconfigitem(
1031 1031 b'experimental',
1032 1032 b'extra-filter-revs',
1033 1033 default=None,
1034 1034 )
1035 1035 coreconfigitem(
1036 1036 b'experimental',
1037 1037 b'maxdeltachainspan',
1038 1038 default=-1,
1039 1039 )
1040 1040 # tracks files which were undeleted (merge might delete them but we explicitly
1041 1041 # kept/undeleted them) and creates new filenodes for them
1042 1042 coreconfigitem(
1043 1043 b'experimental',
1044 1044 b'merge-track-salvaged',
1045 1045 default=False,
1046 1046 )
1047 1047 coreconfigitem(
1048 1048 b'experimental',
1049 1049 b'mmapindexthreshold',
1050 1050 default=None,
1051 1051 )
1052 1052 coreconfigitem(
1053 1053 b'experimental',
1054 1054 b'narrow',
1055 1055 default=False,
1056 1056 )
1057 1057 coreconfigitem(
1058 1058 b'experimental',
1059 1059 b'nonnormalparanoidcheck',
1060 1060 default=False,
1061 1061 )
1062 1062 coreconfigitem(
1063 1063 b'experimental',
1064 1064 b'exportableenviron',
1065 1065 default=list,
1066 1066 )
1067 1067 coreconfigitem(
1068 1068 b'experimental',
1069 1069 b'extendedheader.index',
1070 1070 default=None,
1071 1071 )
1072 1072 coreconfigitem(
1073 1073 b'experimental',
1074 1074 b'extendedheader.similarity',
1075 1075 default=False,
1076 1076 )
1077 1077 coreconfigitem(
1078 1078 b'experimental',
1079 1079 b'graphshorten',
1080 1080 default=False,
1081 1081 )
1082 1082 coreconfigitem(
1083 1083 b'experimental',
1084 1084 b'graphstyle.parent',
1085 1085 default=dynamicdefault,
1086 1086 )
1087 1087 coreconfigitem(
1088 1088 b'experimental',
1089 1089 b'graphstyle.missing',
1090 1090 default=dynamicdefault,
1091 1091 )
1092 1092 coreconfigitem(
1093 1093 b'experimental',
1094 1094 b'graphstyle.grandparent',
1095 1095 default=dynamicdefault,
1096 1096 )
1097 1097 coreconfigitem(
1098 1098 b'experimental',
1099 1099 b'hook-track-tags',
1100 1100 default=False,
1101 1101 )
1102 1102 coreconfigitem(
1103 1103 b'experimental',
1104 1104 b'httppostargs',
1105 1105 default=False,
1106 1106 )
1107 1107 coreconfigitem(b'experimental', b'nointerrupt', default=False)
1108 1108 coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True)
1109 1109
1110 1110 coreconfigitem(
1111 1111 b'experimental',
1112 1112 b'obsmarkers-exchange-debug',
1113 1113 default=False,
1114 1114 )
1115 1115 coreconfigitem(
1116 1116 b'experimental',
1117 1117 b'remotenames',
1118 1118 default=False,
1119 1119 )
1120 1120 coreconfigitem(
1121 1121 b'experimental',
1122 1122 b'removeemptydirs',
1123 1123 default=True,
1124 1124 )
1125 1125 coreconfigitem(
1126 1126 b'experimental',
1127 1127 b'revert.interactive.select-to-keep',
1128 1128 default=False,
1129 1129 )
1130 1130 coreconfigitem(
1131 1131 b'experimental',
1132 1132 b'revisions.prefixhexnode',
1133 1133 default=False,
1134 1134 )
1135 1135 # "out of experimental" todo list.
1136 1136 #
1137 1137 # * include management of a persistent nodemap in the main docket
1138 1138 # * enforce a "no-truncate" policy for mmap safety
1139 1139 # - for censoring operation
1140 1140 # - for stripping operation
1141 1141 # - for rollback operation
1142 1142 # * proper streaming (race free) of the docket file
1143 1143 # * track garbage data to evemtually allow rewriting -existing- sidedata.
1144 1144 # * Exchange-wise, we will also need to do something more efficient than
1145 1145 # keeping references to the affected revlogs, especially memory-wise when
1146 1146 # rewriting sidedata.
1147 1147 # * introduce a proper solution to reduce the number of filelog related files.
1148 1148 # * use caching for reading sidedata (similar to what we do for data).
1149 1149 # * no longer set offset=0 if sidedata_size=0 (simplify cutoff computation).
1150 1150 # * Improvement to consider
1151 1151 # - avoid compression header in chunk using the default compression?
1152 1152 # - forbid "inline" compression mode entirely?
1153 1153 # - split the data offset and flag field (the 2 bytes save are mostly trouble)
1154 1154 # - keep track of uncompressed -chunk- size (to preallocate memory better)
1155 1155 # - keep track of chain base or size (probably not that useful anymore)
1156 1156 coreconfigitem(
1157 1157 b'experimental',
1158 1158 b'revlogv2',
1159 1159 default=None,
1160 1160 )
1161 1161 coreconfigitem(
1162 1162 b'experimental',
1163 1163 b'revisions.disambiguatewithin',
1164 1164 default=None,
1165 1165 )
1166 1166 coreconfigitem(
1167 1167 b'experimental',
1168 1168 b'rust.index',
1169 1169 default=False,
1170 1170 )
1171 1171 coreconfigitem(
1172 1172 b'experimental',
1173 1173 b'server.filesdata.recommended-batch-size',
1174 1174 default=50000,
1175 1175 )
1176 1176 coreconfigitem(
1177 1177 b'experimental',
1178 1178 b'server.manifestdata.recommended-batch-size',
1179 1179 default=100000,
1180 1180 )
1181 1181 coreconfigitem(
1182 1182 b'experimental',
1183 1183 b'server.stream-narrow-clones',
1184 1184 default=False,
1185 1185 )
1186 1186 coreconfigitem(
1187 1187 b'experimental',
1188 1188 b'single-head-per-branch',
1189 1189 default=False,
1190 1190 )
1191 1191 coreconfigitem(
1192 1192 b'experimental',
1193 1193 b'single-head-per-branch:account-closed-heads',
1194 1194 default=False,
1195 1195 )
1196 1196 coreconfigitem(
1197 1197 b'experimental',
1198 1198 b'single-head-per-branch:public-changes-only',
1199 1199 default=False,
1200 1200 )
1201 1201 coreconfigitem(
1202 1202 b'experimental',
1203 1203 b'sparse-read',
1204 1204 default=False,
1205 1205 )
1206 1206 coreconfigitem(
1207 1207 b'experimental',
1208 1208 b'sparse-read.density-threshold',
1209 1209 default=0.50,
1210 1210 )
1211 1211 coreconfigitem(
1212 1212 b'experimental',
1213 1213 b'sparse-read.min-gap-size',
1214 1214 default=b'65K',
1215 1215 )
1216 1216 coreconfigitem(
1217 1217 b'experimental',
1218 1218 b'treemanifest',
1219 1219 default=False,
1220 1220 )
1221 1221 coreconfigitem(
1222 1222 b'experimental',
1223 1223 b'update.atomic-file',
1224 1224 default=False,
1225 1225 )
1226 1226 coreconfigitem(
1227 1227 b'experimental',
1228 1228 b'web.full-garbage-collection-rate',
1229 1229 default=1, # still forcing a full collection on each request
1230 1230 )
1231 1231 coreconfigitem(
1232 1232 b'experimental',
1233 1233 b'worker.wdir-get-thread-safe',
1234 1234 default=False,
1235 1235 )
1236 1236 coreconfigitem(
1237 1237 b'experimental',
1238 1238 b'worker.repository-upgrade',
1239 1239 default=False,
1240 1240 )
1241 1241 coreconfigitem(
1242 1242 b'experimental',
1243 1243 b'xdiff',
1244 1244 default=False,
1245 1245 )
1246 1246 coreconfigitem(
1247 1247 b'extensions',
1248 1248 b'[^:]*',
1249 1249 default=None,
1250 1250 generic=True,
1251 1251 )
1252 1252 coreconfigitem(
1253 1253 b'extensions',
1254 1254 b'[^:]*:required',
1255 1255 default=False,
1256 1256 generic=True,
1257 1257 )
1258 1258 coreconfigitem(
1259 1259 b'extdata',
1260 1260 b'.*',
1261 1261 default=None,
1262 1262 generic=True,
1263 1263 )
1264 1264 coreconfigitem(
1265 1265 b'format',
1266 1266 b'bookmarks-in-store',
1267 1267 default=False,
1268 1268 )
1269 1269 coreconfigitem(
1270 1270 b'format',
1271 1271 b'chunkcachesize',
1272 1272 default=None,
1273 1273 experimental=True,
1274 1274 )
1275 1275 coreconfigitem(
1276 1276 # Enable this dirstate format *when creating a new repository*.
1277 1277 # Which format to use for existing repos is controlled by .hg/requires
1278 1278 b'format',
1279 1279 b'use-dirstate-v2',
1280 1280 default=False,
1281 1281 experimental=True,
1282 1282 alias=[(b'format', b'exp-rc-dirstate-v2')],
1283 1283 )
1284 1284 coreconfigitem(
1285 1285 b'format',
1286 1286 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories',
1287 1287 default=False,
1288 1288 experimental=True,
1289 1289 )
1290 1290 coreconfigitem(
1291 1291 b'format',
1292 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet',
1293 default=False,
1294 experimental=True,
1295 )
1296 coreconfigitem(
1297 b'format',
1292 1298 b'use-dirstate-tracked-hint',
1293 1299 default=False,
1294 1300 experimental=True,
1295 1301 )
1296 1302 coreconfigitem(
1297 1303 b'format',
1298 1304 b'use-dirstate-tracked-hint.version',
1299 1305 default=1,
1300 1306 experimental=True,
1301 1307 )
1302 1308 coreconfigitem(
1303 1309 b'format',
1304 1310 b'use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories',
1305 1311 default=False,
1306 1312 experimental=True,
1307 1313 )
1308 1314 coreconfigitem(
1309 1315 b'format',
1310 1316 b'dotencode',
1311 1317 default=True,
1312 1318 )
1313 1319 coreconfigitem(
1314 1320 b'format',
1315 1321 b'generaldelta',
1316 1322 default=False,
1317 1323 experimental=True,
1318 1324 )
1319 1325 coreconfigitem(
1320 1326 b'format',
1321 1327 b'manifestcachesize',
1322 1328 default=None,
1323 1329 experimental=True,
1324 1330 )
1325 1331 coreconfigitem(
1326 1332 b'format',
1327 1333 b'maxchainlen',
1328 1334 default=dynamicdefault,
1329 1335 experimental=True,
1330 1336 )
1331 1337 coreconfigitem(
1332 1338 b'format',
1333 1339 b'obsstore-version',
1334 1340 default=None,
1335 1341 )
1336 1342 coreconfigitem(
1337 1343 b'format',
1338 1344 b'sparse-revlog',
1339 1345 default=True,
1340 1346 )
1341 1347 coreconfigitem(
1342 1348 b'format',
1343 1349 b'revlog-compression',
1344 1350 default=lambda: [b'zstd', b'zlib'],
1345 1351 alias=[(b'experimental', b'format.compression')],
1346 1352 )
1347 1353 # Experimental TODOs:
1348 1354 #
1349 1355 # * Same as for revlogv2 (but for the reduction of the number of files)
1350 1356 # * Actually computing the rank of changesets
1351 1357 # * Improvement to investigate
1352 1358 # - storing .hgtags fnode
1353 1359 # - storing branch related identifier
1354 1360
1355 1361 coreconfigitem(
1356 1362 b'format',
1357 1363 b'exp-use-changelog-v2',
1358 1364 default=None,
1359 1365 experimental=True,
1360 1366 )
1361 1367 coreconfigitem(
1362 1368 b'format',
1363 1369 b'usefncache',
1364 1370 default=True,
1365 1371 )
1366 1372 coreconfigitem(
1367 1373 b'format',
1368 1374 b'usegeneraldelta',
1369 1375 default=True,
1370 1376 )
1371 1377 coreconfigitem(
1372 1378 b'format',
1373 1379 b'usestore',
1374 1380 default=True,
1375 1381 )
1376 1382
1377 1383
1378 1384 def _persistent_nodemap_default():
1379 1385 """compute `use-persistent-nodemap` default value
1380 1386
1381 1387 The feature is disabled unless a fast implementation is available.
1382 1388 """
1383 1389 from . import policy
1384 1390
1385 1391 return policy.importrust('revlog') is not None
1386 1392
1387 1393
1388 1394 coreconfigitem(
1389 1395 b'format',
1390 1396 b'use-persistent-nodemap',
1391 1397 default=_persistent_nodemap_default,
1392 1398 )
1393 1399 coreconfigitem(
1394 1400 b'format',
1395 1401 b'exp-use-copies-side-data-changeset',
1396 1402 default=False,
1397 1403 experimental=True,
1398 1404 )
1399 1405 coreconfigitem(
1400 1406 b'format',
1401 1407 b'use-share-safe',
1402 1408 default=True,
1403 1409 )
1404 1410 coreconfigitem(
1405 1411 b'format',
1406 1412 b'use-share-safe.automatic-upgrade-of-mismatching-repositories',
1407 1413 default=False,
1408 1414 experimental=True,
1409 1415 )
1410 1416 coreconfigitem(
1411 1417 b'format',
1412 1418 b'use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet',
1413 1419 default=False,
1414 1420 experimental=True,
1415 1421 )
1416 1422 coreconfigitem(
1417 1423 b'format',
1418 1424 b'internal-phase',
1419 1425 default=False,
1420 1426 experimental=True,
1421 1427 )
1422 1428 coreconfigitem(
1423 1429 b'fsmonitor',
1424 1430 b'warn_when_unused',
1425 1431 default=True,
1426 1432 )
1427 1433 coreconfigitem(
1428 1434 b'fsmonitor',
1429 1435 b'warn_update_file_count',
1430 1436 default=50000,
1431 1437 )
1432 1438 coreconfigitem(
1433 1439 b'fsmonitor',
1434 1440 b'warn_update_file_count_rust',
1435 1441 default=400000,
1436 1442 )
1437 1443 coreconfigitem(
1438 1444 b'help',
1439 1445 br'hidden-command\..*',
1440 1446 default=False,
1441 1447 generic=True,
1442 1448 )
1443 1449 coreconfigitem(
1444 1450 b'help',
1445 1451 br'hidden-topic\..*',
1446 1452 default=False,
1447 1453 generic=True,
1448 1454 )
1449 1455 coreconfigitem(
1450 1456 b'hooks',
1451 1457 b'[^:]*',
1452 1458 default=dynamicdefault,
1453 1459 generic=True,
1454 1460 )
1455 1461 coreconfigitem(
1456 1462 b'hooks',
1457 1463 b'.*:run-with-plain',
1458 1464 default=True,
1459 1465 generic=True,
1460 1466 )
1461 1467 coreconfigitem(
1462 1468 b'hgweb-paths',
1463 1469 b'.*',
1464 1470 default=list,
1465 1471 generic=True,
1466 1472 )
1467 1473 coreconfigitem(
1468 1474 b'hostfingerprints',
1469 1475 b'.*',
1470 1476 default=list,
1471 1477 generic=True,
1472 1478 )
1473 1479 coreconfigitem(
1474 1480 b'hostsecurity',
1475 1481 b'ciphers',
1476 1482 default=None,
1477 1483 )
1478 1484 coreconfigitem(
1479 1485 b'hostsecurity',
1480 1486 b'minimumprotocol',
1481 1487 default=dynamicdefault,
1482 1488 )
1483 1489 coreconfigitem(
1484 1490 b'hostsecurity',
1485 1491 b'.*:minimumprotocol$',
1486 1492 default=dynamicdefault,
1487 1493 generic=True,
1488 1494 )
1489 1495 coreconfigitem(
1490 1496 b'hostsecurity',
1491 1497 b'.*:ciphers$',
1492 1498 default=dynamicdefault,
1493 1499 generic=True,
1494 1500 )
1495 1501 coreconfigitem(
1496 1502 b'hostsecurity',
1497 1503 b'.*:fingerprints$',
1498 1504 default=list,
1499 1505 generic=True,
1500 1506 )
1501 1507 coreconfigitem(
1502 1508 b'hostsecurity',
1503 1509 b'.*:verifycertsfile$',
1504 1510 default=None,
1505 1511 generic=True,
1506 1512 )
1507 1513
1508 1514 coreconfigitem(
1509 1515 b'http_proxy',
1510 1516 b'always',
1511 1517 default=False,
1512 1518 )
1513 1519 coreconfigitem(
1514 1520 b'http_proxy',
1515 1521 b'host',
1516 1522 default=None,
1517 1523 )
1518 1524 coreconfigitem(
1519 1525 b'http_proxy',
1520 1526 b'no',
1521 1527 default=list,
1522 1528 )
1523 1529 coreconfigitem(
1524 1530 b'http_proxy',
1525 1531 b'passwd',
1526 1532 default=None,
1527 1533 )
1528 1534 coreconfigitem(
1529 1535 b'http_proxy',
1530 1536 b'user',
1531 1537 default=None,
1532 1538 )
1533 1539
1534 1540 coreconfigitem(
1535 1541 b'http',
1536 1542 b'timeout',
1537 1543 default=None,
1538 1544 )
1539 1545
1540 1546 coreconfigitem(
1541 1547 b'logtoprocess',
1542 1548 b'commandexception',
1543 1549 default=None,
1544 1550 )
1545 1551 coreconfigitem(
1546 1552 b'logtoprocess',
1547 1553 b'commandfinish',
1548 1554 default=None,
1549 1555 )
1550 1556 coreconfigitem(
1551 1557 b'logtoprocess',
1552 1558 b'command',
1553 1559 default=None,
1554 1560 )
1555 1561 coreconfigitem(
1556 1562 b'logtoprocess',
1557 1563 b'develwarn',
1558 1564 default=None,
1559 1565 )
1560 1566 coreconfigitem(
1561 1567 b'logtoprocess',
1562 1568 b'uiblocked',
1563 1569 default=None,
1564 1570 )
1565 1571 coreconfigitem(
1566 1572 b'merge',
1567 1573 b'checkunknown',
1568 1574 default=b'abort',
1569 1575 )
1570 1576 coreconfigitem(
1571 1577 b'merge',
1572 1578 b'checkignored',
1573 1579 default=b'abort',
1574 1580 )
1575 1581 coreconfigitem(
1576 1582 b'experimental',
1577 1583 b'merge.checkpathconflicts',
1578 1584 default=False,
1579 1585 )
1580 1586 coreconfigitem(
1581 1587 b'merge',
1582 1588 b'followcopies',
1583 1589 default=True,
1584 1590 )
1585 1591 coreconfigitem(
1586 1592 b'merge',
1587 1593 b'on-failure',
1588 1594 default=b'continue',
1589 1595 )
1590 1596 coreconfigitem(
1591 1597 b'merge',
1592 1598 b'preferancestor',
1593 1599 default=lambda: [b'*'],
1594 1600 experimental=True,
1595 1601 )
1596 1602 coreconfigitem(
1597 1603 b'merge',
1598 1604 b'strict-capability-check',
1599 1605 default=False,
1600 1606 )
1601 1607 coreconfigitem(
1602 1608 b'merge',
1603 1609 b'disable-partial-tools',
1604 1610 default=False,
1605 1611 experimental=True,
1606 1612 )
1607 1613 coreconfigitem(
1608 1614 b'partial-merge-tools',
1609 1615 b'.*',
1610 1616 default=None,
1611 1617 generic=True,
1612 1618 experimental=True,
1613 1619 )
1614 1620 coreconfigitem(
1615 1621 b'partial-merge-tools',
1616 1622 br'.*\.patterns',
1617 1623 default=dynamicdefault,
1618 1624 generic=True,
1619 1625 priority=-1,
1620 1626 experimental=True,
1621 1627 )
1622 1628 coreconfigitem(
1623 1629 b'partial-merge-tools',
1624 1630 br'.*\.executable$',
1625 1631 default=dynamicdefault,
1626 1632 generic=True,
1627 1633 priority=-1,
1628 1634 experimental=True,
1629 1635 )
1630 1636 coreconfigitem(
1631 1637 b'partial-merge-tools',
1632 1638 br'.*\.order',
1633 1639 default=0,
1634 1640 generic=True,
1635 1641 priority=-1,
1636 1642 experimental=True,
1637 1643 )
1638 1644 coreconfigitem(
1639 1645 b'partial-merge-tools',
1640 1646 br'.*\.args',
1641 1647 default=b"$local $base $other",
1642 1648 generic=True,
1643 1649 priority=-1,
1644 1650 experimental=True,
1645 1651 )
1646 1652 coreconfigitem(
1647 1653 b'partial-merge-tools',
1648 1654 br'.*\.disable',
1649 1655 default=False,
1650 1656 generic=True,
1651 1657 priority=-1,
1652 1658 experimental=True,
1653 1659 )
1654 1660 coreconfigitem(
1655 1661 b'merge-tools',
1656 1662 b'.*',
1657 1663 default=None,
1658 1664 generic=True,
1659 1665 )
1660 1666 coreconfigitem(
1661 1667 b'merge-tools',
1662 1668 br'.*\.args$',
1663 1669 default=b"$local $base $other",
1664 1670 generic=True,
1665 1671 priority=-1,
1666 1672 )
1667 1673 coreconfigitem(
1668 1674 b'merge-tools',
1669 1675 br'.*\.binary$',
1670 1676 default=False,
1671 1677 generic=True,
1672 1678 priority=-1,
1673 1679 )
1674 1680 coreconfigitem(
1675 1681 b'merge-tools',
1676 1682 br'.*\.check$',
1677 1683 default=list,
1678 1684 generic=True,
1679 1685 priority=-1,
1680 1686 )
1681 1687 coreconfigitem(
1682 1688 b'merge-tools',
1683 1689 br'.*\.checkchanged$',
1684 1690 default=False,
1685 1691 generic=True,
1686 1692 priority=-1,
1687 1693 )
1688 1694 coreconfigitem(
1689 1695 b'merge-tools',
1690 1696 br'.*\.executable$',
1691 1697 default=dynamicdefault,
1692 1698 generic=True,
1693 1699 priority=-1,
1694 1700 )
1695 1701 coreconfigitem(
1696 1702 b'merge-tools',
1697 1703 br'.*\.fixeol$',
1698 1704 default=False,
1699 1705 generic=True,
1700 1706 priority=-1,
1701 1707 )
1702 1708 coreconfigitem(
1703 1709 b'merge-tools',
1704 1710 br'.*\.gui$',
1705 1711 default=False,
1706 1712 generic=True,
1707 1713 priority=-1,
1708 1714 )
1709 1715 coreconfigitem(
1710 1716 b'merge-tools',
1711 1717 br'.*\.mergemarkers$',
1712 1718 default=b'basic',
1713 1719 generic=True,
1714 1720 priority=-1,
1715 1721 )
1716 1722 coreconfigitem(
1717 1723 b'merge-tools',
1718 1724 br'.*\.mergemarkertemplate$',
1719 1725 default=dynamicdefault, # take from command-templates.mergemarker
1720 1726 generic=True,
1721 1727 priority=-1,
1722 1728 )
1723 1729 coreconfigitem(
1724 1730 b'merge-tools',
1725 1731 br'.*\.priority$',
1726 1732 default=0,
1727 1733 generic=True,
1728 1734 priority=-1,
1729 1735 )
1730 1736 coreconfigitem(
1731 1737 b'merge-tools',
1732 1738 br'.*\.premerge$',
1733 1739 default=dynamicdefault,
1734 1740 generic=True,
1735 1741 priority=-1,
1736 1742 )
1737 1743 coreconfigitem(
1738 1744 b'merge-tools',
1739 1745 br'.*\.symlink$',
1740 1746 default=False,
1741 1747 generic=True,
1742 1748 priority=-1,
1743 1749 )
1744 1750 coreconfigitem(
1745 1751 b'pager',
1746 1752 b'attend-.*',
1747 1753 default=dynamicdefault,
1748 1754 generic=True,
1749 1755 )
1750 1756 coreconfigitem(
1751 1757 b'pager',
1752 1758 b'ignore',
1753 1759 default=list,
1754 1760 )
1755 1761 coreconfigitem(
1756 1762 b'pager',
1757 1763 b'pager',
1758 1764 default=dynamicdefault,
1759 1765 )
1760 1766 coreconfigitem(
1761 1767 b'patch',
1762 1768 b'eol',
1763 1769 default=b'strict',
1764 1770 )
1765 1771 coreconfigitem(
1766 1772 b'patch',
1767 1773 b'fuzz',
1768 1774 default=2,
1769 1775 )
1770 1776 coreconfigitem(
1771 1777 b'paths',
1772 1778 b'default',
1773 1779 default=None,
1774 1780 )
1775 1781 coreconfigitem(
1776 1782 b'paths',
1777 1783 b'default-push',
1778 1784 default=None,
1779 1785 )
1780 1786 coreconfigitem(
1781 1787 b'paths',
1782 1788 b'.*',
1783 1789 default=None,
1784 1790 generic=True,
1785 1791 )
1786 1792 coreconfigitem(
1787 1793 b'paths',
1788 1794 b'.*:bookmarks.mode',
1789 1795 default='default',
1790 1796 generic=True,
1791 1797 )
1792 1798 coreconfigitem(
1793 1799 b'paths',
1794 1800 b'.*:multi-urls',
1795 1801 default=False,
1796 1802 generic=True,
1797 1803 )
1798 1804 coreconfigitem(
1799 1805 b'paths',
1800 1806 b'.*:pushrev',
1801 1807 default=None,
1802 1808 generic=True,
1803 1809 )
1804 1810 coreconfigitem(
1805 1811 b'paths',
1806 1812 b'.*:pushurl',
1807 1813 default=None,
1808 1814 generic=True,
1809 1815 )
1810 1816 coreconfigitem(
1811 1817 b'phases',
1812 1818 b'checksubrepos',
1813 1819 default=b'follow',
1814 1820 )
1815 1821 coreconfigitem(
1816 1822 b'phases',
1817 1823 b'new-commit',
1818 1824 default=b'draft',
1819 1825 )
1820 1826 coreconfigitem(
1821 1827 b'phases',
1822 1828 b'publish',
1823 1829 default=True,
1824 1830 )
1825 1831 coreconfigitem(
1826 1832 b'profiling',
1827 1833 b'enabled',
1828 1834 default=False,
1829 1835 )
1830 1836 coreconfigitem(
1831 1837 b'profiling',
1832 1838 b'format',
1833 1839 default=b'text',
1834 1840 )
1835 1841 coreconfigitem(
1836 1842 b'profiling',
1837 1843 b'freq',
1838 1844 default=1000,
1839 1845 )
1840 1846 coreconfigitem(
1841 1847 b'profiling',
1842 1848 b'limit',
1843 1849 default=30,
1844 1850 )
1845 1851 coreconfigitem(
1846 1852 b'profiling',
1847 1853 b'nested',
1848 1854 default=0,
1849 1855 )
1850 1856 coreconfigitem(
1851 1857 b'profiling',
1852 1858 b'output',
1853 1859 default=None,
1854 1860 )
1855 1861 coreconfigitem(
1856 1862 b'profiling',
1857 1863 b'showmax',
1858 1864 default=0.999,
1859 1865 )
1860 1866 coreconfigitem(
1861 1867 b'profiling',
1862 1868 b'showmin',
1863 1869 default=dynamicdefault,
1864 1870 )
1865 1871 coreconfigitem(
1866 1872 b'profiling',
1867 1873 b'showtime',
1868 1874 default=True,
1869 1875 )
1870 1876 coreconfigitem(
1871 1877 b'profiling',
1872 1878 b'sort',
1873 1879 default=b'inlinetime',
1874 1880 )
1875 1881 coreconfigitem(
1876 1882 b'profiling',
1877 1883 b'statformat',
1878 1884 default=b'hotpath',
1879 1885 )
1880 1886 coreconfigitem(
1881 1887 b'profiling',
1882 1888 b'time-track',
1883 1889 default=dynamicdefault,
1884 1890 )
1885 1891 coreconfigitem(
1886 1892 b'profiling',
1887 1893 b'type',
1888 1894 default=b'stat',
1889 1895 )
1890 1896 coreconfigitem(
1891 1897 b'progress',
1892 1898 b'assume-tty',
1893 1899 default=False,
1894 1900 )
1895 1901 coreconfigitem(
1896 1902 b'progress',
1897 1903 b'changedelay',
1898 1904 default=1,
1899 1905 )
1900 1906 coreconfigitem(
1901 1907 b'progress',
1902 1908 b'clear-complete',
1903 1909 default=True,
1904 1910 )
1905 1911 coreconfigitem(
1906 1912 b'progress',
1907 1913 b'debug',
1908 1914 default=False,
1909 1915 )
1910 1916 coreconfigitem(
1911 1917 b'progress',
1912 1918 b'delay',
1913 1919 default=3,
1914 1920 )
1915 1921 coreconfigitem(
1916 1922 b'progress',
1917 1923 b'disable',
1918 1924 default=False,
1919 1925 )
1920 1926 coreconfigitem(
1921 1927 b'progress',
1922 1928 b'estimateinterval',
1923 1929 default=60.0,
1924 1930 )
1925 1931 coreconfigitem(
1926 1932 b'progress',
1927 1933 b'format',
1928 1934 default=lambda: [b'topic', b'bar', b'number', b'estimate'],
1929 1935 )
1930 1936 coreconfigitem(
1931 1937 b'progress',
1932 1938 b'refresh',
1933 1939 default=0.1,
1934 1940 )
1935 1941 coreconfigitem(
1936 1942 b'progress',
1937 1943 b'width',
1938 1944 default=dynamicdefault,
1939 1945 )
1940 1946 coreconfigitem(
1941 1947 b'pull',
1942 1948 b'confirm',
1943 1949 default=False,
1944 1950 )
1945 1951 coreconfigitem(
1946 1952 b'push',
1947 1953 b'pushvars.server',
1948 1954 default=False,
1949 1955 )
1950 1956 coreconfigitem(
1951 1957 b'rewrite',
1952 1958 b'backup-bundle',
1953 1959 default=True,
1954 1960 alias=[(b'ui', b'history-editing-backup')],
1955 1961 )
1956 1962 coreconfigitem(
1957 1963 b'rewrite',
1958 1964 b'update-timestamp',
1959 1965 default=False,
1960 1966 )
1961 1967 coreconfigitem(
1962 1968 b'rewrite',
1963 1969 b'empty-successor',
1964 1970 default=b'skip',
1965 1971 experimental=True,
1966 1972 )
1967 1973 # experimental as long as format.use-dirstate-v2 is.
1968 1974 coreconfigitem(
1969 1975 b'storage',
1970 1976 b'dirstate-v2.slow-path',
1971 1977 default=b"abort",
1972 1978 experimental=True,
1973 1979 )
1974 1980 coreconfigitem(
1975 1981 b'storage',
1976 1982 b'new-repo-backend',
1977 1983 default=b'revlogv1',
1978 1984 experimental=True,
1979 1985 )
1980 1986 coreconfigitem(
1981 1987 b'storage',
1982 1988 b'revlog.optimize-delta-parent-choice',
1983 1989 default=True,
1984 1990 alias=[(b'format', b'aggressivemergedeltas')],
1985 1991 )
1986 1992 coreconfigitem(
1987 1993 b'storage',
1988 1994 b'revlog.issue6528.fix-incoming',
1989 1995 default=True,
1990 1996 )
1991 1997 # experimental as long as rust is experimental (or a C version is implemented)
1992 1998 coreconfigitem(
1993 1999 b'storage',
1994 2000 b'revlog.persistent-nodemap.mmap',
1995 2001 default=True,
1996 2002 )
1997 2003 # experimental as long as format.use-persistent-nodemap is.
1998 2004 coreconfigitem(
1999 2005 b'storage',
2000 2006 b'revlog.persistent-nodemap.slow-path',
2001 2007 default=b"abort",
2002 2008 )
2003 2009
2004 2010 coreconfigitem(
2005 2011 b'storage',
2006 2012 b'revlog.reuse-external-delta',
2007 2013 default=True,
2008 2014 )
2009 2015 coreconfigitem(
2010 2016 b'storage',
2011 2017 b'revlog.reuse-external-delta-parent',
2012 2018 default=None,
2013 2019 )
2014 2020 coreconfigitem(
2015 2021 b'storage',
2016 2022 b'revlog.zlib.level',
2017 2023 default=None,
2018 2024 )
2019 2025 coreconfigitem(
2020 2026 b'storage',
2021 2027 b'revlog.zstd.level',
2022 2028 default=None,
2023 2029 )
2024 2030 coreconfigitem(
2025 2031 b'server',
2026 2032 b'bookmarks-pushkey-compat',
2027 2033 default=True,
2028 2034 )
2029 2035 coreconfigitem(
2030 2036 b'server',
2031 2037 b'bundle1',
2032 2038 default=True,
2033 2039 )
2034 2040 coreconfigitem(
2035 2041 b'server',
2036 2042 b'bundle1gd',
2037 2043 default=None,
2038 2044 )
2039 2045 coreconfigitem(
2040 2046 b'server',
2041 2047 b'bundle1.pull',
2042 2048 default=None,
2043 2049 )
2044 2050 coreconfigitem(
2045 2051 b'server',
2046 2052 b'bundle1gd.pull',
2047 2053 default=None,
2048 2054 )
2049 2055 coreconfigitem(
2050 2056 b'server',
2051 2057 b'bundle1.push',
2052 2058 default=None,
2053 2059 )
2054 2060 coreconfigitem(
2055 2061 b'server',
2056 2062 b'bundle1gd.push',
2057 2063 default=None,
2058 2064 )
2059 2065 coreconfigitem(
2060 2066 b'server',
2061 2067 b'bundle2.stream',
2062 2068 default=True,
2063 2069 alias=[(b'experimental', b'bundle2.stream')],
2064 2070 )
2065 2071 coreconfigitem(
2066 2072 b'server',
2067 2073 b'compressionengines',
2068 2074 default=list,
2069 2075 )
2070 2076 coreconfigitem(
2071 2077 b'server',
2072 2078 b'concurrent-push-mode',
2073 2079 default=b'check-related',
2074 2080 )
2075 2081 coreconfigitem(
2076 2082 b'server',
2077 2083 b'disablefullbundle',
2078 2084 default=False,
2079 2085 )
2080 2086 coreconfigitem(
2081 2087 b'server',
2082 2088 b'maxhttpheaderlen',
2083 2089 default=1024,
2084 2090 )
2085 2091 coreconfigitem(
2086 2092 b'server',
2087 2093 b'pullbundle',
2088 2094 default=False,
2089 2095 )
2090 2096 coreconfigitem(
2091 2097 b'server',
2092 2098 b'preferuncompressed',
2093 2099 default=False,
2094 2100 )
2095 2101 coreconfigitem(
2096 2102 b'server',
2097 2103 b'streamunbundle',
2098 2104 default=False,
2099 2105 )
2100 2106 coreconfigitem(
2101 2107 b'server',
2102 2108 b'uncompressed',
2103 2109 default=True,
2104 2110 )
2105 2111 coreconfigitem(
2106 2112 b'server',
2107 2113 b'uncompressedallowsecret',
2108 2114 default=False,
2109 2115 )
2110 2116 coreconfigitem(
2111 2117 b'server',
2112 2118 b'view',
2113 2119 default=b'served',
2114 2120 )
2115 2121 coreconfigitem(
2116 2122 b'server',
2117 2123 b'validate',
2118 2124 default=False,
2119 2125 )
2120 2126 coreconfigitem(
2121 2127 b'server',
2122 2128 b'zliblevel',
2123 2129 default=-1,
2124 2130 )
2125 2131 coreconfigitem(
2126 2132 b'server',
2127 2133 b'zstdlevel',
2128 2134 default=3,
2129 2135 )
2130 2136 coreconfigitem(
2131 2137 b'share',
2132 2138 b'pool',
2133 2139 default=None,
2134 2140 )
2135 2141 coreconfigitem(
2136 2142 b'share',
2137 2143 b'poolnaming',
2138 2144 default=b'identity',
2139 2145 )
2140 2146 coreconfigitem(
2141 2147 b'share',
2142 2148 b'safe-mismatch.source-not-safe',
2143 2149 default=b'abort',
2144 2150 )
2145 2151 coreconfigitem(
2146 2152 b'share',
2147 2153 b'safe-mismatch.source-safe',
2148 2154 default=b'abort',
2149 2155 )
2150 2156 coreconfigitem(
2151 2157 b'share',
2152 2158 b'safe-mismatch.source-not-safe.warn',
2153 2159 default=True,
2154 2160 )
2155 2161 coreconfigitem(
2156 2162 b'share',
2157 2163 b'safe-mismatch.source-safe.warn',
2158 2164 default=True,
2159 2165 )
2160 2166 coreconfigitem(
2161 2167 b'shelve',
2162 2168 b'maxbackups',
2163 2169 default=10,
2164 2170 )
2165 2171 coreconfigitem(
2166 2172 b'smtp',
2167 2173 b'host',
2168 2174 default=None,
2169 2175 )
2170 2176 coreconfigitem(
2171 2177 b'smtp',
2172 2178 b'local_hostname',
2173 2179 default=None,
2174 2180 )
2175 2181 coreconfigitem(
2176 2182 b'smtp',
2177 2183 b'password',
2178 2184 default=None,
2179 2185 )
2180 2186 coreconfigitem(
2181 2187 b'smtp',
2182 2188 b'port',
2183 2189 default=dynamicdefault,
2184 2190 )
2185 2191 coreconfigitem(
2186 2192 b'smtp',
2187 2193 b'tls',
2188 2194 default=b'none',
2189 2195 )
2190 2196 coreconfigitem(
2191 2197 b'smtp',
2192 2198 b'username',
2193 2199 default=None,
2194 2200 )
2195 2201 coreconfigitem(
2196 2202 b'sparse',
2197 2203 b'missingwarning',
2198 2204 default=True,
2199 2205 experimental=True,
2200 2206 )
2201 2207 coreconfigitem(
2202 2208 b'subrepos',
2203 2209 b'allowed',
2204 2210 default=dynamicdefault, # to make backporting simpler
2205 2211 )
2206 2212 coreconfigitem(
2207 2213 b'subrepos',
2208 2214 b'hg:allowed',
2209 2215 default=dynamicdefault,
2210 2216 )
2211 2217 coreconfigitem(
2212 2218 b'subrepos',
2213 2219 b'git:allowed',
2214 2220 default=dynamicdefault,
2215 2221 )
2216 2222 coreconfigitem(
2217 2223 b'subrepos',
2218 2224 b'svn:allowed',
2219 2225 default=dynamicdefault,
2220 2226 )
2221 2227 coreconfigitem(
2222 2228 b'templates',
2223 2229 b'.*',
2224 2230 default=None,
2225 2231 generic=True,
2226 2232 )
2227 2233 coreconfigitem(
2228 2234 b'templateconfig',
2229 2235 b'.*',
2230 2236 default=dynamicdefault,
2231 2237 generic=True,
2232 2238 )
2233 2239 coreconfigitem(
2234 2240 b'trusted',
2235 2241 b'groups',
2236 2242 default=list,
2237 2243 )
2238 2244 coreconfigitem(
2239 2245 b'trusted',
2240 2246 b'users',
2241 2247 default=list,
2242 2248 )
2243 2249 coreconfigitem(
2244 2250 b'ui',
2245 2251 b'_usedassubrepo',
2246 2252 default=False,
2247 2253 )
2248 2254 coreconfigitem(
2249 2255 b'ui',
2250 2256 b'allowemptycommit',
2251 2257 default=False,
2252 2258 )
2253 2259 coreconfigitem(
2254 2260 b'ui',
2255 2261 b'archivemeta',
2256 2262 default=True,
2257 2263 )
2258 2264 coreconfigitem(
2259 2265 b'ui',
2260 2266 b'askusername',
2261 2267 default=False,
2262 2268 )
2263 2269 coreconfigitem(
2264 2270 b'ui',
2265 2271 b'available-memory',
2266 2272 default=None,
2267 2273 )
2268 2274
2269 2275 coreconfigitem(
2270 2276 b'ui',
2271 2277 b'clonebundlefallback',
2272 2278 default=False,
2273 2279 )
2274 2280 coreconfigitem(
2275 2281 b'ui',
2276 2282 b'clonebundleprefers',
2277 2283 default=list,
2278 2284 )
2279 2285 coreconfigitem(
2280 2286 b'ui',
2281 2287 b'clonebundles',
2282 2288 default=True,
2283 2289 )
2284 2290 coreconfigitem(
2285 2291 b'ui',
2286 2292 b'color',
2287 2293 default=b'auto',
2288 2294 )
2289 2295 coreconfigitem(
2290 2296 b'ui',
2291 2297 b'commitsubrepos',
2292 2298 default=False,
2293 2299 )
2294 2300 coreconfigitem(
2295 2301 b'ui',
2296 2302 b'debug',
2297 2303 default=False,
2298 2304 )
2299 2305 coreconfigitem(
2300 2306 b'ui',
2301 2307 b'debugger',
2302 2308 default=None,
2303 2309 )
2304 2310 coreconfigitem(
2305 2311 b'ui',
2306 2312 b'editor',
2307 2313 default=dynamicdefault,
2308 2314 )
2309 2315 coreconfigitem(
2310 2316 b'ui',
2311 2317 b'detailed-exit-code',
2312 2318 default=False,
2313 2319 experimental=True,
2314 2320 )
2315 2321 coreconfigitem(
2316 2322 b'ui',
2317 2323 b'fallbackencoding',
2318 2324 default=None,
2319 2325 )
2320 2326 coreconfigitem(
2321 2327 b'ui',
2322 2328 b'forcecwd',
2323 2329 default=None,
2324 2330 )
2325 2331 coreconfigitem(
2326 2332 b'ui',
2327 2333 b'forcemerge',
2328 2334 default=None,
2329 2335 )
2330 2336 coreconfigitem(
2331 2337 b'ui',
2332 2338 b'formatdebug',
2333 2339 default=False,
2334 2340 )
2335 2341 coreconfigitem(
2336 2342 b'ui',
2337 2343 b'formatjson',
2338 2344 default=False,
2339 2345 )
2340 2346 coreconfigitem(
2341 2347 b'ui',
2342 2348 b'formatted',
2343 2349 default=None,
2344 2350 )
2345 2351 coreconfigitem(
2346 2352 b'ui',
2347 2353 b'interactive',
2348 2354 default=None,
2349 2355 )
2350 2356 coreconfigitem(
2351 2357 b'ui',
2352 2358 b'interface',
2353 2359 default=None,
2354 2360 )
2355 2361 coreconfigitem(
2356 2362 b'ui',
2357 2363 b'interface.chunkselector',
2358 2364 default=None,
2359 2365 )
2360 2366 coreconfigitem(
2361 2367 b'ui',
2362 2368 b'large-file-limit',
2363 2369 default=10 * (2 ** 20),
2364 2370 )
2365 2371 coreconfigitem(
2366 2372 b'ui',
2367 2373 b'logblockedtimes',
2368 2374 default=False,
2369 2375 )
2370 2376 coreconfigitem(
2371 2377 b'ui',
2372 2378 b'merge',
2373 2379 default=None,
2374 2380 )
2375 2381 coreconfigitem(
2376 2382 b'ui',
2377 2383 b'mergemarkers',
2378 2384 default=b'basic',
2379 2385 )
2380 2386 coreconfigitem(
2381 2387 b'ui',
2382 2388 b'message-output',
2383 2389 default=b'stdio',
2384 2390 )
2385 2391 coreconfigitem(
2386 2392 b'ui',
2387 2393 b'nontty',
2388 2394 default=False,
2389 2395 )
2390 2396 coreconfigitem(
2391 2397 b'ui',
2392 2398 b'origbackuppath',
2393 2399 default=None,
2394 2400 )
2395 2401 coreconfigitem(
2396 2402 b'ui',
2397 2403 b'paginate',
2398 2404 default=True,
2399 2405 )
2400 2406 coreconfigitem(
2401 2407 b'ui',
2402 2408 b'patch',
2403 2409 default=None,
2404 2410 )
2405 2411 coreconfigitem(
2406 2412 b'ui',
2407 2413 b'portablefilenames',
2408 2414 default=b'warn',
2409 2415 )
2410 2416 coreconfigitem(
2411 2417 b'ui',
2412 2418 b'promptecho',
2413 2419 default=False,
2414 2420 )
2415 2421 coreconfigitem(
2416 2422 b'ui',
2417 2423 b'quiet',
2418 2424 default=False,
2419 2425 )
2420 2426 coreconfigitem(
2421 2427 b'ui',
2422 2428 b'quietbookmarkmove',
2423 2429 default=False,
2424 2430 )
2425 2431 coreconfigitem(
2426 2432 b'ui',
2427 2433 b'relative-paths',
2428 2434 default=b'legacy',
2429 2435 )
2430 2436 coreconfigitem(
2431 2437 b'ui',
2432 2438 b'remotecmd',
2433 2439 default=b'hg',
2434 2440 )
2435 2441 coreconfigitem(
2436 2442 b'ui',
2437 2443 b'report_untrusted',
2438 2444 default=True,
2439 2445 )
2440 2446 coreconfigitem(
2441 2447 b'ui',
2442 2448 b'rollback',
2443 2449 default=True,
2444 2450 )
2445 2451 coreconfigitem(
2446 2452 b'ui',
2447 2453 b'signal-safe-lock',
2448 2454 default=True,
2449 2455 )
2450 2456 coreconfigitem(
2451 2457 b'ui',
2452 2458 b'slash',
2453 2459 default=False,
2454 2460 )
2455 2461 coreconfigitem(
2456 2462 b'ui',
2457 2463 b'ssh',
2458 2464 default=b'ssh',
2459 2465 )
2460 2466 coreconfigitem(
2461 2467 b'ui',
2462 2468 b'ssherrorhint',
2463 2469 default=None,
2464 2470 )
2465 2471 coreconfigitem(
2466 2472 b'ui',
2467 2473 b'statuscopies',
2468 2474 default=False,
2469 2475 )
2470 2476 coreconfigitem(
2471 2477 b'ui',
2472 2478 b'strict',
2473 2479 default=False,
2474 2480 )
2475 2481 coreconfigitem(
2476 2482 b'ui',
2477 2483 b'style',
2478 2484 default=b'',
2479 2485 )
2480 2486 coreconfigitem(
2481 2487 b'ui',
2482 2488 b'supportcontact',
2483 2489 default=None,
2484 2490 )
2485 2491 coreconfigitem(
2486 2492 b'ui',
2487 2493 b'textwidth',
2488 2494 default=78,
2489 2495 )
2490 2496 coreconfigitem(
2491 2497 b'ui',
2492 2498 b'timeout',
2493 2499 default=b'600',
2494 2500 )
2495 2501 coreconfigitem(
2496 2502 b'ui',
2497 2503 b'timeout.warn',
2498 2504 default=0,
2499 2505 )
2500 2506 coreconfigitem(
2501 2507 b'ui',
2502 2508 b'timestamp-output',
2503 2509 default=False,
2504 2510 )
2505 2511 coreconfigitem(
2506 2512 b'ui',
2507 2513 b'traceback',
2508 2514 default=False,
2509 2515 )
2510 2516 coreconfigitem(
2511 2517 b'ui',
2512 2518 b'tweakdefaults',
2513 2519 default=False,
2514 2520 )
2515 2521 coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')])
2516 2522 coreconfigitem(
2517 2523 b'ui',
2518 2524 b'verbose',
2519 2525 default=False,
2520 2526 )
2521 2527 coreconfigitem(
2522 2528 b'verify',
2523 2529 b'skipflags',
2524 2530 default=None,
2525 2531 )
2526 2532 coreconfigitem(
2527 2533 b'web',
2528 2534 b'allowbz2',
2529 2535 default=False,
2530 2536 )
2531 2537 coreconfigitem(
2532 2538 b'web',
2533 2539 b'allowgz',
2534 2540 default=False,
2535 2541 )
2536 2542 coreconfigitem(
2537 2543 b'web',
2538 2544 b'allow-pull',
2539 2545 alias=[(b'web', b'allowpull')],
2540 2546 default=True,
2541 2547 )
2542 2548 coreconfigitem(
2543 2549 b'web',
2544 2550 b'allow-push',
2545 2551 alias=[(b'web', b'allow_push')],
2546 2552 default=list,
2547 2553 )
2548 2554 coreconfigitem(
2549 2555 b'web',
2550 2556 b'allowzip',
2551 2557 default=False,
2552 2558 )
2553 2559 coreconfigitem(
2554 2560 b'web',
2555 2561 b'archivesubrepos',
2556 2562 default=False,
2557 2563 )
2558 2564 coreconfigitem(
2559 2565 b'web',
2560 2566 b'cache',
2561 2567 default=True,
2562 2568 )
2563 2569 coreconfigitem(
2564 2570 b'web',
2565 2571 b'comparisoncontext',
2566 2572 default=5,
2567 2573 )
2568 2574 coreconfigitem(
2569 2575 b'web',
2570 2576 b'contact',
2571 2577 default=None,
2572 2578 )
2573 2579 coreconfigitem(
2574 2580 b'web',
2575 2581 b'deny_push',
2576 2582 default=list,
2577 2583 )
2578 2584 coreconfigitem(
2579 2585 b'web',
2580 2586 b'guessmime',
2581 2587 default=False,
2582 2588 )
2583 2589 coreconfigitem(
2584 2590 b'web',
2585 2591 b'hidden',
2586 2592 default=False,
2587 2593 )
2588 2594 coreconfigitem(
2589 2595 b'web',
2590 2596 b'labels',
2591 2597 default=list,
2592 2598 )
2593 2599 coreconfigitem(
2594 2600 b'web',
2595 2601 b'logoimg',
2596 2602 default=b'hglogo.png',
2597 2603 )
2598 2604 coreconfigitem(
2599 2605 b'web',
2600 2606 b'logourl',
2601 2607 default=b'https://mercurial-scm.org/',
2602 2608 )
2603 2609 coreconfigitem(
2604 2610 b'web',
2605 2611 b'accesslog',
2606 2612 default=b'-',
2607 2613 )
2608 2614 coreconfigitem(
2609 2615 b'web',
2610 2616 b'address',
2611 2617 default=b'',
2612 2618 )
2613 2619 coreconfigitem(
2614 2620 b'web',
2615 2621 b'allow-archive',
2616 2622 alias=[(b'web', b'allow_archive')],
2617 2623 default=list,
2618 2624 )
2619 2625 coreconfigitem(
2620 2626 b'web',
2621 2627 b'allow_read',
2622 2628 default=list,
2623 2629 )
2624 2630 coreconfigitem(
2625 2631 b'web',
2626 2632 b'baseurl',
2627 2633 default=None,
2628 2634 )
2629 2635 coreconfigitem(
2630 2636 b'web',
2631 2637 b'cacerts',
2632 2638 default=None,
2633 2639 )
2634 2640 coreconfigitem(
2635 2641 b'web',
2636 2642 b'certificate',
2637 2643 default=None,
2638 2644 )
2639 2645 coreconfigitem(
2640 2646 b'web',
2641 2647 b'collapse',
2642 2648 default=False,
2643 2649 )
2644 2650 coreconfigitem(
2645 2651 b'web',
2646 2652 b'csp',
2647 2653 default=None,
2648 2654 )
2649 2655 coreconfigitem(
2650 2656 b'web',
2651 2657 b'deny_read',
2652 2658 default=list,
2653 2659 )
2654 2660 coreconfigitem(
2655 2661 b'web',
2656 2662 b'descend',
2657 2663 default=True,
2658 2664 )
2659 2665 coreconfigitem(
2660 2666 b'web',
2661 2667 b'description',
2662 2668 default=b"",
2663 2669 )
2664 2670 coreconfigitem(
2665 2671 b'web',
2666 2672 b'encoding',
2667 2673 default=lambda: encoding.encoding,
2668 2674 )
2669 2675 coreconfigitem(
2670 2676 b'web',
2671 2677 b'errorlog',
2672 2678 default=b'-',
2673 2679 )
2674 2680 coreconfigitem(
2675 2681 b'web',
2676 2682 b'ipv6',
2677 2683 default=False,
2678 2684 )
2679 2685 coreconfigitem(
2680 2686 b'web',
2681 2687 b'maxchanges',
2682 2688 default=10,
2683 2689 )
2684 2690 coreconfigitem(
2685 2691 b'web',
2686 2692 b'maxfiles',
2687 2693 default=10,
2688 2694 )
2689 2695 coreconfigitem(
2690 2696 b'web',
2691 2697 b'maxshortchanges',
2692 2698 default=60,
2693 2699 )
2694 2700 coreconfigitem(
2695 2701 b'web',
2696 2702 b'motd',
2697 2703 default=b'',
2698 2704 )
2699 2705 coreconfigitem(
2700 2706 b'web',
2701 2707 b'name',
2702 2708 default=dynamicdefault,
2703 2709 )
2704 2710 coreconfigitem(
2705 2711 b'web',
2706 2712 b'port',
2707 2713 default=8000,
2708 2714 )
2709 2715 coreconfigitem(
2710 2716 b'web',
2711 2717 b'prefix',
2712 2718 default=b'',
2713 2719 )
2714 2720 coreconfigitem(
2715 2721 b'web',
2716 2722 b'push_ssl',
2717 2723 default=True,
2718 2724 )
2719 2725 coreconfigitem(
2720 2726 b'web',
2721 2727 b'refreshinterval',
2722 2728 default=20,
2723 2729 )
2724 2730 coreconfigitem(
2725 2731 b'web',
2726 2732 b'server-header',
2727 2733 default=None,
2728 2734 )
2729 2735 coreconfigitem(
2730 2736 b'web',
2731 2737 b'static',
2732 2738 default=None,
2733 2739 )
2734 2740 coreconfigitem(
2735 2741 b'web',
2736 2742 b'staticurl',
2737 2743 default=None,
2738 2744 )
2739 2745 coreconfigitem(
2740 2746 b'web',
2741 2747 b'stripes',
2742 2748 default=1,
2743 2749 )
2744 2750 coreconfigitem(
2745 2751 b'web',
2746 2752 b'style',
2747 2753 default=b'paper',
2748 2754 )
2749 2755 coreconfigitem(
2750 2756 b'web',
2751 2757 b'templates',
2752 2758 default=None,
2753 2759 )
2754 2760 coreconfigitem(
2755 2761 b'web',
2756 2762 b'view',
2757 2763 default=b'served',
2758 2764 experimental=True,
2759 2765 )
2760 2766 coreconfigitem(
2761 2767 b'worker',
2762 2768 b'backgroundclose',
2763 2769 default=dynamicdefault,
2764 2770 )
2765 2771 # Windows defaults to a limit of 512 open files. A buffer of 128
2766 2772 # should give us enough headway.
2767 2773 coreconfigitem(
2768 2774 b'worker',
2769 2775 b'backgroundclosemaxqueue',
2770 2776 default=384,
2771 2777 )
2772 2778 coreconfigitem(
2773 2779 b'worker',
2774 2780 b'backgroundcloseminfilecount',
2775 2781 default=2048,
2776 2782 )
2777 2783 coreconfigitem(
2778 2784 b'worker',
2779 2785 b'backgroundclosethreadcount',
2780 2786 default=4,
2781 2787 )
2782 2788 coreconfigitem(
2783 2789 b'worker',
2784 2790 b'enabled',
2785 2791 default=True,
2786 2792 )
2787 2793 coreconfigitem(
2788 2794 b'worker',
2789 2795 b'numcpus',
2790 2796 default=None,
2791 2797 )
2792 2798
2793 2799 # Rebase related configuration moved to core because other extension are doing
2794 2800 # strange things. For example, shelve import the extensions to reuse some bit
2795 2801 # without formally loading it.
2796 2802 coreconfigitem(
2797 2803 b'commands',
2798 2804 b'rebase.requiredest',
2799 2805 default=False,
2800 2806 )
2801 2807 coreconfigitem(
2802 2808 b'experimental',
2803 2809 b'rebaseskipobsolete',
2804 2810 default=True,
2805 2811 )
2806 2812 coreconfigitem(
2807 2813 b'rebase',
2808 2814 b'singletransaction',
2809 2815 default=False,
2810 2816 )
2811 2817 coreconfigitem(
2812 2818 b'rebase',
2813 2819 b'experimental.inmemory',
2814 2820 default=False,
2815 2821 )
@@ -1,3274 +1,3277 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 --source` 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-not-shared`` (per-repository)
58 58 - ``<repo>/.hg/hgrc`` (per-repository)
59 59 - ``$HOME/.hgrc`` (per-user)
60 60 - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user)
61 61 - ``<install-root>/etc/mercurial/hgrc`` (per-installation)
62 62 - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation)
63 63 - ``/etc/mercurial/hgrc`` (per-system)
64 64 - ``/etc/mercurial/hgrc.d/*.rc`` (per-system)
65 65 - ``<internal>/*.rc`` (defaults)
66 66
67 67 .. container:: verbose.windows
68 68
69 69 On Windows, the following files are consulted:
70 70
71 71 - ``<repo>/.hg/hgrc-not-shared`` (per-repository)
72 72 - ``<repo>/.hg/hgrc`` (per-repository)
73 73 - ``%USERPROFILE%\.hgrc`` (per-user)
74 74 - ``%USERPROFILE%\Mercurial.ini`` (per-user)
75 75 - ``%HOME%\.hgrc`` (per-user)
76 76 - ``%HOME%\Mercurial.ini`` (per-user)
77 77 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-system)
78 78 - ``<install-dir>\hgrc.d\*.rc`` (per-installation)
79 79 - ``<install-dir>\Mercurial.ini`` (per-installation)
80 80 - ``%PROGRAMDATA%\Mercurial\hgrc`` (per-system)
81 81 - ``%PROGRAMDATA%\Mercurial\Mercurial.ini`` (per-system)
82 82 - ``%PROGRAMDATA%\Mercurial\hgrc.d\*.rc`` (per-system)
83 83 - ``<internal>/*.rc`` (defaults)
84 84
85 85 .. note::
86 86
87 87 The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial``
88 88 is used when running 32-bit Python on 64-bit Windows.
89 89
90 90 .. container:: verbose.plan9
91 91
92 92 On Plan9, the following files are consulted:
93 93
94 94 - ``<repo>/.hg/hgrc-not-shared`` (per-repository)
95 95 - ``<repo>/.hg/hgrc`` (per-repository)
96 96 - ``$home/lib/hgrc`` (per-user)
97 97 - ``<install-root>/lib/mercurial/hgrc`` (per-installation)
98 98 - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation)
99 99 - ``/lib/mercurial/hgrc`` (per-system)
100 100 - ``/lib/mercurial/hgrc.d/*.rc`` (per-system)
101 101 - ``<internal>/*.rc`` (defaults)
102 102
103 103 Per-repository configuration options only apply in a
104 104 particular repository. This file is not version-controlled, and
105 105 will not get transferred during a "clone" operation. Options in
106 106 this file override options in all other configuration files.
107 107
108 108 .. container:: unix.plan9
109 109
110 110 On Plan 9 and Unix, most of this file will be ignored if it doesn't
111 111 belong to a trusted user or to a trusted group. See
112 112 :hg:`help config.trusted` for more details.
113 113
114 114 Per-user configuration file(s) are for the user running Mercurial. Options
115 115 in these files apply to all Mercurial commands executed by this user in any
116 116 directory. Options in these files override per-system and per-installation
117 117 options.
118 118
119 119 Per-installation configuration files are searched for in the
120 120 directory where Mercurial is installed. ``<install-root>`` is the
121 121 parent directory of the **hg** executable (or symlink) being run.
122 122
123 123 .. container:: unix.plan9
124 124
125 125 For example, if installed in ``/shared/tools/bin/hg``, Mercurial
126 126 will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these
127 127 files apply to all Mercurial commands executed by any user in any
128 128 directory.
129 129
130 130 Per-installation configuration files are for the system on
131 131 which Mercurial is running. Options in these files apply to all
132 132 Mercurial commands executed by any user in any directory. Registry
133 133 keys contain PATH-like strings, every part of which must reference
134 134 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
135 135 be read. Mercurial checks each of these locations in the specified
136 136 order until one or more configuration files are detected.
137 137
138 138 Per-system configuration files are for the system on which Mercurial
139 139 is running. Options in these files apply to all Mercurial commands
140 140 executed by any user in any directory. Options in these files
141 141 override per-installation options.
142 142
143 143 Mercurial comes with some default configuration. The default configuration
144 144 files are installed with Mercurial and will be overwritten on upgrades. Default
145 145 configuration files should never be edited by users or administrators but can
146 146 be overridden in other configuration files. So far the directory only contains
147 147 merge tool configuration but packagers can also put other default configuration
148 148 there.
149 149
150 150 On versions 5.7 and later, if share-safe functionality is enabled,
151 151 shares will read config file of share source too.
152 152 `<share-source/.hg/hgrc>` is read before reading `<repo/.hg/hgrc>`.
153 153
154 154 For configs which should not be shared, `<repo/.hg/hgrc-not-shared>`
155 155 should be used.
156 156
157 157 Syntax
158 158 ======
159 159
160 160 A configuration file consists of sections, led by a ``[section]`` header
161 161 and followed by ``name = value`` entries (sometimes called
162 162 ``configuration keys``)::
163 163
164 164 [spam]
165 165 eggs=ham
166 166 green=
167 167 eggs
168 168
169 169 Each line contains one entry. If the lines that follow are indented,
170 170 they are treated as continuations of that entry. Leading whitespace is
171 171 removed from values. Empty lines are skipped. Lines beginning with
172 172 ``#`` or ``;`` are ignored and may be used to provide comments.
173 173
174 174 Configuration keys can be set multiple times, in which case Mercurial
175 175 will use the value that was configured last. As an example::
176 176
177 177 [spam]
178 178 eggs=large
179 179 ham=serrano
180 180 eggs=small
181 181
182 182 This would set the configuration key named ``eggs`` to ``small``.
183 183
184 184 It is also possible to define a section multiple times. A section can
185 185 be redefined on the same and/or on different configuration files. For
186 186 example::
187 187
188 188 [foo]
189 189 eggs=large
190 190 ham=serrano
191 191 eggs=small
192 192
193 193 [bar]
194 194 eggs=ham
195 195 green=
196 196 eggs
197 197
198 198 [foo]
199 199 ham=prosciutto
200 200 eggs=medium
201 201 bread=toasted
202 202
203 203 This would set the ``eggs``, ``ham``, and ``bread`` configuration keys
204 204 of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``,
205 205 respectively. As you can see there only thing that matters is the last
206 206 value that was set for each of the configuration keys.
207 207
208 208 If a configuration key is set multiple times in different
209 209 configuration files the final value will depend on the order in which
210 210 the different configuration files are read, with settings from earlier
211 211 paths overriding later ones as described on the ``Files`` section
212 212 above.
213 213
214 214 A line of the form ``%include file`` will include ``file`` into the
215 215 current configuration file. The inclusion is recursive, which means
216 216 that included files can include other files. Filenames are relative to
217 217 the configuration file in which the ``%include`` directive is found.
218 218 Environment variables and ``~user`` constructs are expanded in
219 219 ``file``. This lets you do something like::
220 220
221 221 %include ~/.hgrc.d/$HOST.rc
222 222
223 223 to include a different configuration file on each computer you use.
224 224
225 225 A line with ``%unset name`` will remove ``name`` from the current
226 226 section, if it has been set previously.
227 227
228 228 The values are either free-form text strings, lists of text strings,
229 229 or Boolean values. Boolean values can be set to true using any of "1",
230 230 "yes", "true", or "on" and to false using "0", "no", "false", or "off"
231 231 (all case insensitive).
232 232
233 233 List values are separated by whitespace or comma, except when values are
234 234 placed in double quotation marks::
235 235
236 236 allow_read = "John Doe, PhD", brian, betty
237 237
238 238 Quotation marks can be escaped by prefixing them with a backslash. Only
239 239 quotation marks at the beginning of a word is counted as a quotation
240 240 (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``).
241 241
242 242 Sections
243 243 ========
244 244
245 245 This section describes the different sections that may appear in a
246 246 Mercurial configuration file, the purpose of each section, its possible
247 247 keys, and their possible values.
248 248
249 249 ``alias``
250 250 ---------
251 251
252 252 Defines command aliases.
253 253
254 254 Aliases allow you to define your own commands in terms of other
255 255 commands (or aliases), optionally including arguments. Positional
256 256 arguments in the form of ``$1``, ``$2``, etc. in the alias definition
257 257 are expanded by Mercurial before execution. Positional arguments not
258 258 already used by ``$N`` in the definition are put at the end of the
259 259 command to be executed.
260 260
261 261 Alias definitions consist of lines of the form::
262 262
263 263 <alias> = <command> [<argument>]...
264 264
265 265 For example, this definition::
266 266
267 267 latest = log --limit 5
268 268
269 269 creates a new command ``latest`` that shows only the five most recent
270 270 changesets. You can define subsequent aliases using earlier ones::
271 271
272 272 stable5 = latest -b stable
273 273
274 274 .. note::
275 275
276 276 It is possible to create aliases with the same names as
277 277 existing commands, which will then override the original
278 278 definitions. This is almost always a bad idea!
279 279
280 280 An alias can start with an exclamation point (``!``) to make it a
281 281 shell alias. A shell alias is executed with the shell and will let you
282 282 run arbitrary commands. As an example, ::
283 283
284 284 echo = !echo $@
285 285
286 286 will let you do ``hg echo foo`` to have ``foo`` printed in your
287 287 terminal. A better example might be::
288 288
289 289 purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f
290 290
291 291 which will make ``hg purge`` delete all unknown files in the
292 292 repository in the same manner as the purge extension.
293 293
294 294 Positional arguments like ``$1``, ``$2``, etc. in the alias definition
295 295 expand to the command arguments. Unmatched arguments are
296 296 removed. ``$0`` expands to the alias name and ``$@`` expands to all
297 297 arguments separated by a space. ``"$@"`` (with quotes) expands to all
298 298 arguments quoted individually and separated by a space. These expansions
299 299 happen before the command is passed to the shell.
300 300
301 301 Shell aliases are executed in an environment where ``$HG`` expands to
302 302 the path of the Mercurial that was used to execute the alias. This is
303 303 useful when you want to call further Mercurial commands in a shell
304 304 alias, as was done above for the purge alias. In addition,
305 305 ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg
306 306 echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``.
307 307
308 308 .. note::
309 309
310 310 Some global configuration options such as ``-R`` are
311 311 processed before shell aliases and will thus not be passed to
312 312 aliases.
313 313
314 314
315 315 ``annotate``
316 316 ------------
317 317
318 318 Settings used when displaying file annotations. All values are
319 319 Booleans and default to False. See :hg:`help config.diff` for
320 320 related options for the diff command.
321 321
322 322 ``ignorews``
323 323 Ignore white space when comparing lines.
324 324
325 325 ``ignorewseol``
326 326 Ignore white space at the end of a line when comparing lines.
327 327
328 328 ``ignorewsamount``
329 329 Ignore changes in the amount of white space.
330 330
331 331 ``ignoreblanklines``
332 332 Ignore changes whose lines are all blank.
333 333
334 334
335 335 ``auth``
336 336 --------
337 337
338 338 Authentication credentials and other authentication-like configuration
339 339 for HTTP connections. This section allows you to store usernames and
340 340 passwords for use when logging *into* HTTP servers. See
341 341 :hg:`help config.web` if you want to configure *who* can login to
342 342 your HTTP server.
343 343
344 344 The following options apply to all hosts.
345 345
346 346 ``cookiefile``
347 347 Path to a file containing HTTP cookie lines. Cookies matching a
348 348 host will be sent automatically.
349 349
350 350 The file format uses the Mozilla cookies.txt format, which defines cookies
351 351 on their own lines. Each line contains 7 fields delimited by the tab
352 352 character (domain, is_domain_cookie, path, is_secure, expires, name,
353 353 value). For more info, do an Internet search for "Netscape cookies.txt
354 354 format."
355 355
356 356 Note: the cookies parser does not handle port numbers on domains. You
357 357 will need to remove ports from the domain for the cookie to be recognized.
358 358 This could result in a cookie being disclosed to an unwanted server.
359 359
360 360 The cookies file is read-only.
361 361
362 362 Other options in this section are grouped by name and have the following
363 363 format::
364 364
365 365 <name>.<argument> = <value>
366 366
367 367 where ``<name>`` is used to group arguments into authentication
368 368 entries. Example::
369 369
370 370 foo.prefix = hg.intevation.de/mercurial
371 371 foo.username = foo
372 372 foo.password = bar
373 373 foo.schemes = http https
374 374
375 375 bar.prefix = secure.example.org
376 376 bar.key = path/to/file.key
377 377 bar.cert = path/to/file.cert
378 378 bar.schemes = https
379 379
380 380 Supported arguments:
381 381
382 382 ``prefix``
383 383 Either ``*`` or a URI prefix with or without the scheme part.
384 384 The authentication entry with the longest matching prefix is used
385 385 (where ``*`` matches everything and counts as a match of length
386 386 1). If the prefix doesn't include a scheme, the match is performed
387 387 against the URI with its scheme stripped as well, and the schemes
388 388 argument, q.v., is then subsequently consulted.
389 389
390 390 ``username``
391 391 Optional. Username to authenticate with. If not given, and the
392 392 remote site requires basic or digest authentication, the user will
393 393 be prompted for it. Environment variables are expanded in the
394 394 username letting you do ``foo.username = $USER``. If the URI
395 395 includes a username, only ``[auth]`` entries with a matching
396 396 username or without a username will be considered.
397 397
398 398 ``password``
399 399 Optional. Password to authenticate with. If not given, and the
400 400 remote site requires basic or digest authentication, the user
401 401 will be prompted for it.
402 402
403 403 ``key``
404 404 Optional. PEM encoded client certificate key file. Environment
405 405 variables are expanded in the filename.
406 406
407 407 ``cert``
408 408 Optional. PEM encoded client certificate chain file. Environment
409 409 variables are expanded in the filename.
410 410
411 411 ``schemes``
412 412 Optional. Space separated list of URI schemes to use this
413 413 authentication entry with. Only used if the prefix doesn't include
414 414 a scheme. Supported schemes are http and https. They will match
415 415 static-http and static-https respectively, as well.
416 416 (default: https)
417 417
418 418 If no suitable authentication entry is found, the user is prompted
419 419 for credentials as usual if required by the remote.
420 420
421 421 ``cmdserver``
422 422 -------------
423 423
424 424 Controls command server settings. (ADVANCED)
425 425
426 426 ``message-encodings``
427 427 List of encodings for the ``m`` (message) channel. The first encoding
428 428 supported by the server will be selected and advertised in the hello
429 429 message. This is useful only when ``ui.message-output`` is set to
430 430 ``channel``. Supported encodings are ``cbor``.
431 431
432 432 ``shutdown-on-interrupt``
433 433 If set to false, the server's main loop will continue running after
434 434 SIGINT received. ``runcommand`` requests can still be interrupted by
435 435 SIGINT. Close the write end of the pipe to shut down the server
436 436 process gracefully.
437 437 (default: True)
438 438
439 439 ``color``
440 440 ---------
441 441
442 442 Configure the Mercurial color mode. For details about how to define your custom
443 443 effect and style see :hg:`help color`.
444 444
445 445 ``mode``
446 446 String: control the method used to output color. One of ``auto``, ``ansi``,
447 447 ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will
448 448 use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a
449 449 terminal. Any invalid value will disable color.
450 450
451 451 ``pagermode``
452 452 String: optional override of ``color.mode`` used with pager.
453 453
454 454 On some systems, terminfo mode may cause problems when using
455 455 color with ``less -R`` as a pager program. less with the -R option
456 456 will only display ECMA-48 color codes, and terminfo mode may sometimes
457 457 emit codes that less doesn't understand. You can work around this by
458 458 either using ansi mode (or auto mode), or by using less -r (which will
459 459 pass through all terminal control codes, not just color control
460 460 codes).
461 461
462 462 On some systems (such as MSYS in Windows), the terminal may support
463 463 a different color mode than the pager program.
464 464
465 465 ``commands``
466 466 ------------
467 467
468 468 ``commit.post-status``
469 469 Show status of files in the working directory after successful commit.
470 470 (default: False)
471 471
472 472 ``merge.require-rev``
473 473 Require that the revision to merge the current commit with be specified on
474 474 the command line. If this is enabled and a revision is not specified, the
475 475 command aborts.
476 476 (default: False)
477 477
478 478 ``push.require-revs``
479 479 Require revisions to push be specified using one or more mechanisms such as
480 480 specifying them positionally on the command line, using ``-r``, ``-b``,
481 481 and/or ``-B`` on the command line, or using ``paths.<path>:pushrev`` in the
482 482 configuration. If this is enabled and revisions are not specified, the
483 483 command aborts.
484 484 (default: False)
485 485
486 486 ``resolve.confirm``
487 487 Confirm before performing action if no filename is passed.
488 488 (default: False)
489 489
490 490 ``resolve.explicit-re-merge``
491 491 Require uses of ``hg resolve`` to specify which action it should perform,
492 492 instead of re-merging files by default.
493 493 (default: False)
494 494
495 495 ``resolve.mark-check``
496 496 Determines what level of checking :hg:`resolve --mark` will perform before
497 497 marking files as resolved. Valid values are ``none`, ``warn``, and
498 498 ``abort``. ``warn`` will output a warning listing the file(s) that still
499 499 have conflict markers in them, but will still mark everything resolved.
500 500 ``abort`` will output the same warning but will not mark things as resolved.
501 501 If --all is passed and this is set to ``abort``, only a warning will be
502 502 shown (an error will not be raised).
503 503 (default: ``none``)
504 504
505 505 ``status.relative``
506 506 Make paths in :hg:`status` output relative to the current directory.
507 507 (default: False)
508 508
509 509 ``status.terse``
510 510 Default value for the --terse flag, which condenses status output.
511 511 (default: empty)
512 512
513 513 ``update.check``
514 514 Determines what level of checking :hg:`update` will perform before moving
515 515 to a destination revision. Valid values are ``abort``, ``none``,
516 516 ``linear``, and ``noconflict``.
517 517
518 518 - ``abort`` always fails if the working directory has uncommitted changes.
519 519
520 520 - ``none`` performs no checking, and may result in a merge with uncommitted changes.
521 521
522 522 - ``linear`` allows any update as long as it follows a straight line in the
523 523 revision history, and may trigger a merge with uncommitted changes.
524 524
525 525 - ``noconflict`` will allow any update which would not trigger a merge with
526 526 uncommitted changes, if any are present.
527 527
528 528 (default: ``linear``)
529 529
530 530 ``update.requiredest``
531 531 Require that the user pass a destination when running :hg:`update`.
532 532 For example, :hg:`update .::` will be allowed, but a plain :hg:`update`
533 533 will be disallowed.
534 534 (default: False)
535 535
536 536 ``committemplate``
537 537 ------------------
538 538
539 539 ``changeset``
540 540 String: configuration in this section is used as the template to
541 541 customize the text shown in the editor when committing.
542 542
543 543 In addition to pre-defined template keywords, commit log specific one
544 544 below can be used for customization:
545 545
546 546 ``extramsg``
547 547 String: Extra message (typically 'Leave message empty to abort
548 548 commit.'). This may be changed by some commands or extensions.
549 549
550 550 For example, the template configuration below shows as same text as
551 551 one shown by default::
552 552
553 553 [committemplate]
554 554 changeset = {desc}\n\n
555 555 HG: Enter commit message. Lines beginning with 'HG:' are removed.
556 556 HG: {extramsg}
557 557 HG: --
558 558 HG: user: {author}\n{ifeq(p2rev, "-1", "",
559 559 "HG: branch merge\n")
560 560 }HG: branch '{branch}'\n{if(activebookmark,
561 561 "HG: bookmark '{activebookmark}'\n") }{subrepos %
562 562 "HG: subrepo {subrepo}\n" }{file_adds %
563 563 "HG: added {file}\n" }{file_mods %
564 564 "HG: changed {file}\n" }{file_dels %
565 565 "HG: removed {file}\n" }{if(files, "",
566 566 "HG: no files changed\n")}
567 567
568 568 ``diff()``
569 569 String: show the diff (see :hg:`help templates` for detail)
570 570
571 571 Sometimes it is helpful to show the diff of the changeset in the editor without
572 572 having to prefix 'HG: ' to each line so that highlighting works correctly. For
573 573 this, Mercurial provides a special string which will ignore everything below
574 574 it::
575 575
576 576 HG: ------------------------ >8 ------------------------
577 577
578 578 For example, the template configuration below will show the diff below the
579 579 extra message::
580 580
581 581 [committemplate]
582 582 changeset = {desc}\n\n
583 583 HG: Enter commit message. Lines beginning with 'HG:' are removed.
584 584 HG: {extramsg}
585 585 HG: ------------------------ >8 ------------------------
586 586 HG: Do not touch the line above.
587 587 HG: Everything below will be removed.
588 588 {diff()}
589 589
590 590 .. note::
591 591
592 592 For some problematic encodings (see :hg:`help win32mbcs` for
593 593 detail), this customization should be configured carefully, to
594 594 avoid showing broken characters.
595 595
596 596 For example, if a multibyte character ending with backslash (0x5c) is
597 597 followed by the ASCII character 'n' in the customized template,
598 598 the sequence of backslash and 'n' is treated as line-feed unexpectedly
599 599 (and the multibyte character is broken, too).
600 600
601 601 Customized template is used for commands below (``--edit`` may be
602 602 required):
603 603
604 604 - :hg:`backout`
605 605 - :hg:`commit`
606 606 - :hg:`fetch` (for merge commit only)
607 607 - :hg:`graft`
608 608 - :hg:`histedit`
609 609 - :hg:`import`
610 610 - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh`
611 611 - :hg:`rebase`
612 612 - :hg:`shelve`
613 613 - :hg:`sign`
614 614 - :hg:`tag`
615 615 - :hg:`transplant`
616 616
617 617 Configuring items below instead of ``changeset`` allows showing
618 618 customized message only for specific actions, or showing different
619 619 messages for each action.
620 620
621 621 - ``changeset.backout`` for :hg:`backout`
622 622 - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges
623 623 - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other
624 624 - ``changeset.commit.normal.merge`` for :hg:`commit` on merges
625 625 - ``changeset.commit.normal.normal`` for :hg:`commit` on other
626 626 - ``changeset.fetch`` for :hg:`fetch` (impling merge commit)
627 627 - ``changeset.gpg.sign`` for :hg:`sign`
628 628 - ``changeset.graft`` for :hg:`graft`
629 629 - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit`
630 630 - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit`
631 631 - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit`
632 632 - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit`
633 633 - ``changeset.import.bypass`` for :hg:`import --bypass`
634 634 - ``changeset.import.normal.merge`` for :hg:`import` on merges
635 635 - ``changeset.import.normal.normal`` for :hg:`import` on other
636 636 - ``changeset.mq.qnew`` for :hg:`qnew`
637 637 - ``changeset.mq.qfold`` for :hg:`qfold`
638 638 - ``changeset.mq.qrefresh`` for :hg:`qrefresh`
639 639 - ``changeset.rebase.collapse`` for :hg:`rebase --collapse`
640 640 - ``changeset.rebase.merge`` for :hg:`rebase` on merges
641 641 - ``changeset.rebase.normal`` for :hg:`rebase` on other
642 642 - ``changeset.shelve.shelve`` for :hg:`shelve`
643 643 - ``changeset.tag.add`` for :hg:`tag` without ``--remove``
644 644 - ``changeset.tag.remove`` for :hg:`tag --remove`
645 645 - ``changeset.transplant.merge`` for :hg:`transplant` on merges
646 646 - ``changeset.transplant.normal`` for :hg:`transplant` on other
647 647
648 648 These dot-separated lists of names are treated as hierarchical ones.
649 649 For example, ``changeset.tag.remove`` customizes the commit message
650 650 only for :hg:`tag --remove`, but ``changeset.tag`` customizes the
651 651 commit message for :hg:`tag` regardless of ``--remove`` option.
652 652
653 653 When the external editor is invoked for a commit, the corresponding
654 654 dot-separated list of names without the ``changeset.`` prefix
655 655 (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment
656 656 variable.
657 657
658 658 In this section, items other than ``changeset`` can be referred from
659 659 others. For example, the configuration to list committed files up
660 660 below can be referred as ``{listupfiles}``::
661 661
662 662 [committemplate]
663 663 listupfiles = {file_adds %
664 664 "HG: added {file}\n" }{file_mods %
665 665 "HG: changed {file}\n" }{file_dels %
666 666 "HG: removed {file}\n" }{if(files, "",
667 667 "HG: no files changed\n")}
668 668
669 669 ``decode/encode``
670 670 -----------------
671 671
672 672 Filters for transforming files on checkout/checkin. This would
673 673 typically be used for newline processing or other
674 674 localization/canonicalization of files.
675 675
676 676 Filters consist of a filter pattern followed by a filter command.
677 677 Filter patterns are globs by default, rooted at the repository root.
678 678 For example, to match any file ending in ``.txt`` in the root
679 679 directory only, use the pattern ``*.txt``. To match any file ending
680 680 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
681 681 For each file only the first matching filter applies.
682 682
683 683 The filter command can start with a specifier, either ``pipe:`` or
684 684 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
685 685
686 686 A ``pipe:`` command must accept data on stdin and return the transformed
687 687 data on stdout.
688 688
689 689 Pipe example::
690 690
691 691 [encode]
692 692 # uncompress gzip files on checkin to improve delta compression
693 693 # note: not necessarily a good idea, just an example
694 694 *.gz = pipe: gunzip
695 695
696 696 [decode]
697 697 # recompress gzip files when writing them to the working dir (we
698 698 # can safely omit "pipe:", because it's the default)
699 699 *.gz = gzip
700 700
701 701 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
702 702 with the name of a temporary file that contains the data to be
703 703 filtered by the command. The string ``OUTFILE`` is replaced with the name
704 704 of an empty temporary file, where the filtered data must be written by
705 705 the command.
706 706
707 707 .. container:: windows
708 708
709 709 .. note::
710 710
711 711 The tempfile mechanism is recommended for Windows systems,
712 712 where the standard shell I/O redirection operators often have
713 713 strange effects and may corrupt the contents of your files.
714 714
715 715 This filter mechanism is used internally by the ``eol`` extension to
716 716 translate line ending characters between Windows (CRLF) and Unix (LF)
717 717 format. We suggest you use the ``eol`` extension for convenience.
718 718
719 719
720 720 ``defaults``
721 721 ------------
722 722
723 723 (defaults are deprecated. Don't use them. Use aliases instead.)
724 724
725 725 Use the ``[defaults]`` section to define command defaults, i.e. the
726 726 default options/arguments to pass to the specified commands.
727 727
728 728 The following example makes :hg:`log` run in verbose mode, and
729 729 :hg:`status` show only the modified files, by default::
730 730
731 731 [defaults]
732 732 log = -v
733 733 status = -m
734 734
735 735 The actual commands, instead of their aliases, must be used when
736 736 defining command defaults. The command defaults will also be applied
737 737 to the aliases of the commands defined.
738 738
739 739
740 740 ``diff``
741 741 --------
742 742
743 743 Settings used when displaying diffs. Everything except for ``unified``
744 744 is a Boolean and defaults to False. See :hg:`help config.annotate`
745 745 for related options for the annotate command.
746 746
747 747 ``git``
748 748 Use git extended diff format.
749 749
750 750 ``nobinary``
751 751 Omit git binary patches.
752 752
753 753 ``nodates``
754 754 Don't include dates in diff headers.
755 755
756 756 ``noprefix``
757 757 Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode.
758 758
759 759 ``showfunc``
760 760 Show which function each change is in.
761 761
762 762 ``ignorews``
763 763 Ignore white space when comparing lines.
764 764
765 765 ``ignorewsamount``
766 766 Ignore changes in the amount of white space.
767 767
768 768 ``ignoreblanklines``
769 769 Ignore changes whose lines are all blank.
770 770
771 771 ``unified``
772 772 Number of lines of context to show.
773 773
774 774 ``word-diff``
775 775 Highlight changed words.
776 776
777 777 ``email``
778 778 ---------
779 779
780 780 Settings for extensions that send email messages.
781 781
782 782 ``from``
783 783 Optional. Email address to use in "From" header and SMTP envelope
784 784 of outgoing messages.
785 785
786 786 ``to``
787 787 Optional. Comma-separated list of recipients' email addresses.
788 788
789 789 ``cc``
790 790 Optional. Comma-separated list of carbon copy recipients'
791 791 email addresses.
792 792
793 793 ``bcc``
794 794 Optional. Comma-separated list of blind carbon copy recipients'
795 795 email addresses.
796 796
797 797 ``method``
798 798 Optional. Method to use to send email messages. If value is ``smtp``
799 799 (default), use SMTP (see the ``[smtp]`` section for configuration).
800 800 Otherwise, use as name of program to run that acts like sendmail
801 801 (takes ``-f`` option for sender, list of recipients on command line,
802 802 message on stdin). Normally, setting this to ``sendmail`` or
803 803 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
804 804
805 805 ``charsets``
806 806 Optional. Comma-separated list of character sets considered
807 807 convenient for recipients. Addresses, headers, and parts not
808 808 containing patches of outgoing messages will be encoded in the
809 809 first character set to which conversion from local encoding
810 810 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
811 811 conversion fails, the text in question is sent as is.
812 812 (default: '')
813 813
814 814 Order of outgoing email character sets:
815 815
816 816 1. ``us-ascii``: always first, regardless of settings
817 817 2. ``email.charsets``: in order given by user
818 818 3. ``ui.fallbackencoding``: if not in email.charsets
819 819 4. ``$HGENCODING``: if not in email.charsets
820 820 5. ``utf-8``: always last, regardless of settings
821 821
822 822 Email example::
823 823
824 824 [email]
825 825 from = Joseph User <joe.user@example.com>
826 826 method = /usr/sbin/sendmail
827 827 # charsets for western Europeans
828 828 # us-ascii, utf-8 omitted, as they are tried first and last
829 829 charsets = iso-8859-1, iso-8859-15, windows-1252
830 830
831 831
832 832 ``extensions``
833 833 --------------
834 834
835 835 Mercurial has an extension mechanism for adding new features. To
836 836 enable an extension, create an entry for it in this section.
837 837
838 838 If you know that the extension is already in Python's search path,
839 839 you can give the name of the module, followed by ``=``, with nothing
840 840 after the ``=``.
841 841
842 842 Otherwise, give a name that you choose, followed by ``=``, followed by
843 843 the path to the ``.py`` file (including the file name extension) that
844 844 defines the extension.
845 845
846 846 To explicitly disable an extension that is enabled in an hgrc of
847 847 broader scope, prepend its path with ``!``, as in ``foo = !/ext/path``
848 848 or ``foo = !`` when path is not supplied.
849 849
850 850 Example for ``~/.hgrc``::
851 851
852 852 [extensions]
853 853 # (the churn extension will get loaded from Mercurial's path)
854 854 churn =
855 855 # (this extension will get loaded from the file specified)
856 856 myfeature = ~/.hgext/myfeature.py
857 857
858 858 If an extension fails to load, a warning will be issued, and Mercurial will
859 859 proceed. To enforce that an extension must be loaded, one can set the `required`
860 860 suboption in the config::
861 861
862 862 [extensions]
863 863 myfeature = ~/.hgext/myfeature.py
864 864 myfeature:required = yes
865 865
866 866 To debug extension loading issue, one can add `--traceback` to their mercurial
867 867 invocation.
868 868
869 869 A default setting can we set using the special `*` extension key::
870 870
871 871 [extensions]
872 872 *:required = yes
873 873 myfeature = ~/.hgext/myfeature.py
874 874 rebase=
875 875
876 876
877 877 ``format``
878 878 ----------
879 879
880 880 Configuration that controls the repository format. Newer format options are more
881 881 powerful, but incompatible with some older versions of Mercurial. Format options
882 882 are considered at repository initialization only. You need to make a new clone
883 883 for config changes to be taken into account.
884 884
885 885 For more details about repository format and version compatibility, see
886 886 https://www.mercurial-scm.org/wiki/MissingRequirement
887 887
888 888 ``usegeneraldelta``
889 889 Enable or disable the "generaldelta" repository format which improves
890 890 repository compression by allowing "revlog" to store deltas against
891 891 arbitrary revisions instead of the previously stored one. This provides
892 892 significant improvement for repositories with branches.
893 893
894 894 Repositories with this on-disk format require Mercurial version 1.9.
895 895
896 896 Enabled by default.
897 897
898 898 ``dotencode``
899 899 Enable or disable the "dotencode" repository format which enhances
900 900 the "fncache" repository format (which has to be enabled to use
901 901 dotencode) to avoid issues with filenames starting with "._" on
902 902 Mac OS X and spaces on Windows.
903 903
904 904 Repositories with this on-disk format require Mercurial version 1.7.
905 905
906 906 Enabled by default.
907 907
908 908 ``usefncache``
909 909 Enable or disable the "fncache" repository format which enhances
910 910 the "store" repository format (which has to be enabled to use
911 911 fncache) to allow longer filenames and avoids using Windows
912 912 reserved names, e.g. "nul".
913 913
914 914 Repositories with this on-disk format require Mercurial version 1.1.
915 915
916 916 Enabled by default.
917 917
918 918 ``use-dirstate-v2``
919 919 Enable or disable the experimental "dirstate-v2" feature. The dirstate
920 920 functionality is shared by all commands interacting with the working copy.
921 921 The new version is more robust, faster and stores more information.
922 922
923 923 The performance-improving version of this feature is currently only
924 924 implemented in Rust (see :hg:`help rust`), so people not using a version of
925 925 Mercurial compiled with the Rust parts might actually suffer some slowdown.
926 926 For this reason, such versions will by default refuse to access repositories
927 927 with "dirstate-v2" enabled.
928 928
929 929 This behavior can be adjusted via configuration: check
930 930 :hg:`help config.storage.dirstate-v2.slow-path` for details.
931 931
932 932 Repositories with this on-disk format require Mercurial 6.0 or above.
933 933
934 934 By default this format variant is disabled if the fast implementation is not
935 935 available, and enabled by default if the fast implementation is available.
936 936
937 937 To accomodate installations of Mercurial without the fast implementation,
938 938 you can downgrade your repository. To do so run the following command:
939 939
940 940 $ hg debugupgraderepo \
941 941 --run \
942 942 --config format.use-dirstate-v2=False \
943 943 --config storage.dirstate-v2.slow-path=allow
944 944
945 945 For a more comprehensive guide, see :hg:`help internals.dirstate-v2`.
946 946
947 947 ``use-dirstate-v2.automatic-upgrade-of-mismatching-repositories``
948 948 When enabled, an automatic upgrade will be triggered when a repository format
949 949 does not match its `use-dirstate-v2` config.
950 950
951 951 This is an advanced behavior that most users will not need. We recommend you
952 952 don't use this unless you are a seasoned administrator of a Mercurial install
953 953 base.
954 954
955 955 Automatic upgrade means that any process accessing the repository will
956 956 upgrade the repository format to use `dirstate-v2`. This only triggers if a
957 957 change is needed. This also applies to operations that would have been
958 958 read-only (like hg status).
959 959
960 960 If the repository cannot be locked, the automatic-upgrade operation will be
961 961 skipped. The next operation will attempt it again.
962 962
963 963 This configuration will apply for moves in any direction, either adding the
964 964 `dirstate-v2` format if `format.use-dirstate-v2=yes` or removing the
965 965 `dirstate-v2` requirement if `format.use-dirstate-v2=no`. So we recommend
966 966 setting both this value and `format.use-dirstate-v2` at the same time.
967 967
968 ``use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet``
969 Hide message when performing such automatic upgrade.
970
968 971 ``use-dirstate-tracked-hint``
969 972 Enable or disable the writing of "tracked key" file alongside the dirstate.
970 973 (default to disabled)
971 974
972 975 That "tracked-hint" can help external automations to detect changes to the
973 976 set of tracked files. (i.e the result of `hg files` or `hg status -macd`)
974 977
975 978 The tracked-hint is written in a new `.hg/dirstate-tracked-hint`. That file
976 979 contains two lines:
977 980 - the first line is the file version (currently: 1),
978 981 - the second line contains the "tracked-hint".
979 982 That file is written right after the dirstate is written.
980 983
981 984 The tracked-hint changes whenever the set of file tracked in the dirstate
982 985 changes. The general idea is:
983 986 - if the hint is identical, the set of tracked file SHOULD be identical,
984 987 - if the hint is different, the set of tracked file MIGHT be different.
985 988
986 989 The "hint is identical" case uses `SHOULD` as the dirstate and the hint file
987 990 are two distinct files and therefore that cannot be read or written to in an
988 991 atomic way. If the key is identical, nothing garantees that the dirstate is
989 992 not updated right after the hint file. This is considered a negligible
990 993 limitation for the intended usecase. It is actually possible to prevent this
991 994 race by taking the repository lock during read operations.
992 995
993 996 They are two "ways" to use this feature:
994 997
995 998 1) monitoring changes to the `.hg/dirstate-tracked-hint`, if the file
996 999 changes, the tracked set might have changed.
997 1000
998 1001 2) storing the value and comparing it to a later value.
999 1002
1000 1003
1001 1004 ``use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories``
1002 1005 When enabled, an automatic upgrade will be triggered when a repository format
1003 1006 does not match its `use-dirstate-tracked-hint` config.
1004 1007
1005 1008 This is an advanced behavior that most users will not need. We recommend you
1006 1009 don't use this unless you are a seasoned administrator of a Mercurial install
1007 1010 base.
1008 1011
1009 1012 Automatic upgrade means that any process accessing the repository will
1010 1013 upgrade the repository format to use `dirstate-tracked-hint`. This only
1011 1014 triggers if a change is needed. This also applies to operations that would
1012 1015 have been read-only (like hg status).
1013 1016
1014 1017 If the repository cannot be locked, the automatic-upgrade operation will be
1015 1018 skipped. The next operation will attempt it again.
1016 1019
1017 1020 This configuration will apply for moves in any direction, either adding the
1018 1021 `dirstate-tracked-hint` format if `format.use-dirstate-tracked-hint=yes` or
1019 1022 removing the `dirstate-tracked-hint` requirement if
1020 1023 `format.use-dirstate-tracked-hint=no`. So we recommend setting both this
1021 1024 value and `format.use-dirstate-tracked-hint` at the same time.
1022 1025
1023 1026
1024 1027 ``use-persistent-nodemap``
1025 1028 Enable or disable the "persistent-nodemap" feature which improves
1026 1029 performance if the Rust extensions are available.
1027 1030
1028 1031 The "persistent-nodemap" persist the "node -> rev" on disk removing the
1029 1032 need to dynamically build that mapping for each Mercurial invocation. This
1030 1033 significantly reduces the startup cost of various local and server-side
1031 1034 operation for larger repositories.
1032 1035
1033 1036 The performance-improving version of this feature is currently only
1034 1037 implemented in Rust (see :hg:`help rust`), so people not using a version of
1035 1038 Mercurial compiled with the Rust parts might actually suffer some slowdown.
1036 1039 For this reason, such versions will by default refuse to access repositories
1037 1040 with "persistent-nodemap".
1038 1041
1039 1042 This behavior can be adjusted via configuration: check
1040 1043 :hg:`help config.storage.revlog.persistent-nodemap.slow-path` for details.
1041 1044
1042 1045 Repositories with this on-disk format require Mercurial 5.4 or above.
1043 1046
1044 1047 By default this format variant is disabled if the fast implementation is not
1045 1048 available, and enabled by default if the fast implementation is available.
1046 1049
1047 1050 To accomodate installations of Mercurial without the fast implementation,
1048 1051 you can downgrade your repository. To do so run the following command:
1049 1052
1050 1053 $ hg debugupgraderepo \
1051 1054 --run \
1052 1055 --config format.use-persistent-nodemap=False \
1053 1056 --config storage.revlog.persistent-nodemap.slow-path=allow
1054 1057
1055 1058 ``use-share-safe``
1056 1059 Enforce "safe" behaviors for all "shares" that access this repository.
1057 1060
1058 1061 With this feature, "shares" using this repository as a source will:
1059 1062
1060 1063 * read the source repository's configuration (`<source>/.hg/hgrc`).
1061 1064 * read and use the source repository's "requirements"
1062 1065 (except the working copy specific one).
1063 1066
1064 1067 Without this feature, "shares" using this repository as a source will:
1065 1068
1066 1069 * keep tracking the repository "requirements" in the share only, ignoring
1067 1070 the source "requirements", possibly diverging from them.
1068 1071 * ignore source repository config. This can create problems, like silently
1069 1072 ignoring important hooks.
1070 1073
1071 1074 Beware that existing shares will not be upgraded/downgraded, and by
1072 1075 default, Mercurial will refuse to interact with them until the mismatch
1073 1076 is resolved. See :hg:`help config.share.safe-mismatch.source-safe` and
1074 1077 :hg:`help config.share.safe-mismatch.source-not-safe` for details.
1075 1078
1076 1079 Introduced in Mercurial 5.7.
1077 1080
1078 1081 Enabled by default in Mercurial 6.1.
1079 1082
1080 1083 ``use-share-safe.automatic-upgrade-of-mismatching-repositories``
1081 1084 When enabled, an automatic upgrade will be triggered when a repository format
1082 1085 does not match its `use-share-safe` config.
1083 1086
1084 1087 This is an advanced behavior that most users will not need. We recommend you
1085 1088 don't use this unless you are a seasoned administrator of a Mercurial install
1086 1089 base.
1087 1090
1088 1091 Automatic upgrade means that any process accessing the repository will
1089 1092 upgrade the repository format to use `share-safe`. This only triggers if a
1090 1093 change is needed. This also applies to operation that would have been
1091 1094 read-only (like hg status).
1092 1095
1093 1096 If the repository cannot be locked, the automatic-upgrade operation will be
1094 1097 skipped. The next operation will attempt it again.
1095 1098
1096 1099 This configuration will apply for moves in any direction, either adding the
1097 1100 `share-safe` format if `format.use-share-safe=yes` or removing the
1098 1101 `share-safe` requirement if `format.use-share-safe=no`. So we recommend
1099 1102 setting both this value and `format.use-share-safe` at the same time.
1100 1103
1101 1104 ``use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet``
1102 1105 Hide message when performing such automatic upgrade.
1103 1106
1104 1107 ``usestore``
1105 1108 Enable or disable the "store" repository format which improves
1106 1109 compatibility with systems that fold case or otherwise mangle
1107 1110 filenames. Disabling this option will allow you to store longer filenames
1108 1111 in some situations at the expense of compatibility.
1109 1112
1110 1113 Repositories with this on-disk format require Mercurial version 0.9.4.
1111 1114
1112 1115 Enabled by default.
1113 1116
1114 1117 ``sparse-revlog``
1115 1118 Enable or disable the ``sparse-revlog`` delta strategy. This format improves
1116 1119 delta re-use inside revlog. For very branchy repositories, it results in a
1117 1120 smaller store. For repositories with many revisions, it also helps
1118 1121 performance (by using shortened delta chains.)
1119 1122
1120 1123 Repositories with this on-disk format require Mercurial version 4.7
1121 1124
1122 1125 Enabled by default.
1123 1126
1124 1127 ``revlog-compression``
1125 1128 Compression algorithm used by revlog. Supported values are `zlib` and
1126 1129 `zstd`. The `zlib` engine is the historical default of Mercurial. `zstd` is
1127 1130 a newer format that is usually a net win over `zlib`, operating faster at
1128 1131 better compression rates. Use `zstd` to reduce CPU usage. Multiple values
1129 1132 can be specified, the first available one will be used.
1130 1133
1131 1134 On some systems, the Mercurial installation may lack `zstd` support.
1132 1135
1133 1136 Default is `zstd` if available, `zlib` otherwise.
1134 1137
1135 1138 ``bookmarks-in-store``
1136 1139 Store bookmarks in .hg/store/. This means that bookmarks are shared when
1137 1140 using `hg share` regardless of the `-B` option.
1138 1141
1139 1142 Repositories with this on-disk format require Mercurial version 5.1.
1140 1143
1141 1144 Disabled by default.
1142 1145
1143 1146
1144 1147 ``graph``
1145 1148 ---------
1146 1149
1147 1150 Web graph view configuration. This section let you change graph
1148 1151 elements display properties by branches, for instance to make the
1149 1152 ``default`` branch stand out.
1150 1153
1151 1154 Each line has the following format::
1152 1155
1153 1156 <branch>.<argument> = <value>
1154 1157
1155 1158 where ``<branch>`` is the name of the branch being
1156 1159 customized. Example::
1157 1160
1158 1161 [graph]
1159 1162 # 2px width
1160 1163 default.width = 2
1161 1164 # red color
1162 1165 default.color = FF0000
1163 1166
1164 1167 Supported arguments:
1165 1168
1166 1169 ``width``
1167 1170 Set branch edges width in pixels.
1168 1171
1169 1172 ``color``
1170 1173 Set branch edges color in hexadecimal RGB notation.
1171 1174
1172 1175 ``hooks``
1173 1176 ---------
1174 1177
1175 1178 Commands or Python functions that get automatically executed by
1176 1179 various actions such as starting or finishing a commit. Multiple
1177 1180 hooks can be run for the same action by appending a suffix to the
1178 1181 action. Overriding a site-wide hook can be done by changing its
1179 1182 value or setting it to an empty string. Hooks can be prioritized
1180 1183 by adding a prefix of ``priority.`` to the hook name on a new line
1181 1184 and setting the priority. The default priority is 0.
1182 1185
1183 1186 Example ``.hg/hgrc``::
1184 1187
1185 1188 [hooks]
1186 1189 # update working directory after adding changesets
1187 1190 changegroup.update = hg update
1188 1191 # do not use the site-wide hook
1189 1192 incoming =
1190 1193 incoming.email = /my/email/hook
1191 1194 incoming.autobuild = /my/build/hook
1192 1195 # force autobuild hook to run before other incoming hooks
1193 1196 priority.incoming.autobuild = 1
1194 1197 ### control HGPLAIN setting when running autobuild hook
1195 1198 # HGPLAIN always set (default from Mercurial 5.7)
1196 1199 incoming.autobuild:run-with-plain = yes
1197 1200 # HGPLAIN never set
1198 1201 incoming.autobuild:run-with-plain = no
1199 1202 # HGPLAIN inherited from environment (default before Mercurial 5.7)
1200 1203 incoming.autobuild:run-with-plain = auto
1201 1204
1202 1205 Most hooks are run with environment variables set that give useful
1203 1206 additional information. For each hook below, the environment variables
1204 1207 it is passed are listed with names in the form ``$HG_foo``. The
1205 1208 ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks.
1206 1209 They contain the type of hook which triggered the run and the full name
1207 1210 of the hook in the config, respectively. In the example above, this will
1208 1211 be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``.
1209 1212
1210 1213 .. container:: windows
1211 1214
1212 1215 Some basic Unix syntax can be enabled for portability, including ``$VAR``
1213 1216 and ``${VAR}`` style variables. A ``~`` followed by ``\`` or ``/`` will
1214 1217 be expanded to ``%USERPROFILE%`` to simulate a subset of tilde expansion
1215 1218 on Unix. To use a literal ``$`` or ``~``, it must be escaped with a back
1216 1219 slash or inside of a strong quote. Strong quotes will be replaced by
1217 1220 double quotes after processing.
1218 1221
1219 1222 This feature is enabled by adding a prefix of ``tonative.`` to the hook
1220 1223 name on a new line, and setting it to ``True``. For example::
1221 1224
1222 1225 [hooks]
1223 1226 incoming.autobuild = /my/build/hook
1224 1227 # enable translation to cmd.exe syntax for autobuild hook
1225 1228 tonative.incoming.autobuild = True
1226 1229
1227 1230 ``changegroup``
1228 1231 Run after a changegroup has been added via push, pull or unbundle. The ID of
1229 1232 the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``.
1230 1233 The URL from which changes came is in ``$HG_URL``.
1231 1234
1232 1235 ``commit``
1233 1236 Run after a changeset has been created in the local repository. The ID
1234 1237 of the newly created changeset is in ``$HG_NODE``. Parent changeset
1235 1238 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
1236 1239
1237 1240 ``incoming``
1238 1241 Run after a changeset has been pulled, pushed, or unbundled into
1239 1242 the local repository. The ID of the newly arrived changeset is in
1240 1243 ``$HG_NODE``. The URL that was source of the changes is in ``$HG_URL``.
1241 1244
1242 1245 ``outgoing``
1243 1246 Run after sending changes from the local repository to another. The ID of
1244 1247 first changeset sent is in ``$HG_NODE``. The source of operation is in
1245 1248 ``$HG_SOURCE``. Also see :hg:`help config.hooks.preoutgoing`.
1246 1249
1247 1250 ``post-<command>``
1248 1251 Run after successful invocations of the associated command. The
1249 1252 contents of the command line are passed as ``$HG_ARGS`` and the result
1250 1253 code in ``$HG_RESULT``. Parsed command line arguments are passed as
1251 1254 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of
1252 1255 the python data internally passed to <command>. ``$HG_OPTS`` is a
1253 1256 dictionary of options (with unspecified options set to their defaults).
1254 1257 ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
1255 1258
1256 1259 ``fail-<command>``
1257 1260 Run after a failed invocation of an associated command. The contents
1258 1261 of the command line are passed as ``$HG_ARGS``. Parsed command line
1259 1262 arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain
1260 1263 string representations of the python data internally passed to
1261 1264 <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified
1262 1265 options set to their defaults). ``$HG_PATS`` is a list of arguments.
1263 1266 Hook failure is ignored.
1264 1267
1265 1268 ``pre-<command>``
1266 1269 Run before executing the associated command. The contents of the
1267 1270 command line are passed as ``$HG_ARGS``. Parsed command line arguments
1268 1271 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string
1269 1272 representations of the data internally passed to <command>. ``$HG_OPTS``
1270 1273 is a dictionary of options (with unspecified options set to their
1271 1274 defaults). ``$HG_PATS`` is a list of arguments. If the hook returns
1272 1275 failure, the command doesn't execute and Mercurial returns the failure
1273 1276 code.
1274 1277
1275 1278 ``prechangegroup``
1276 1279 Run before a changegroup is added via push, pull or unbundle. Exit
1277 1280 status 0 allows the changegroup to proceed. A non-zero status will
1278 1281 cause the push, pull or unbundle to fail. The URL from which changes
1279 1282 will come is in ``$HG_URL``.
1280 1283
1281 1284 ``precommit``
1282 1285 Run before starting a local commit. Exit status 0 allows the
1283 1286 commit to proceed. A non-zero status will cause the commit to fail.
1284 1287 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
1285 1288
1286 1289 ``prelistkeys``
1287 1290 Run before listing pushkeys (like bookmarks) in the
1288 1291 repository. A non-zero status will cause failure. The key namespace is
1289 1292 in ``$HG_NAMESPACE``.
1290 1293
1291 1294 ``preoutgoing``
1292 1295 Run before collecting changes to send from the local repository to
1293 1296 another. A non-zero status will cause failure. This lets you prevent
1294 1297 pull over HTTP or SSH. It can also prevent propagating commits (via
1295 1298 local pull, push (outbound) or bundle commands), but not completely,
1296 1299 since you can just copy files instead. The source of operation is in
1297 1300 ``$HG_SOURCE``. If "serve", the operation is happening on behalf of a remote
1298 1301 SSH or HTTP repository. If "push", "pull" or "bundle", the operation
1299 1302 is happening on behalf of a repository on same system.
1300 1303
1301 1304 ``prepushkey``
1302 1305 Run before a pushkey (like a bookmark) is added to the
1303 1306 repository. A non-zero status will cause the key to be rejected. The
1304 1307 key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``,
1305 1308 the old value (if any) is in ``$HG_OLD``, and the new value is in
1306 1309 ``$HG_NEW``.
1307 1310
1308 1311 ``pretag``
1309 1312 Run before creating a tag. Exit status 0 allows the tag to be
1310 1313 created. A non-zero status will cause the tag to fail. The ID of the
1311 1314 changeset to tag is in ``$HG_NODE``. The name of tag is in ``$HG_TAG``. The
1312 1315 tag is local if ``$HG_LOCAL=1``, or in the repository if ``$HG_LOCAL=0``.
1313 1316
1314 1317 ``pretxnopen``
1315 1318 Run before any new repository transaction is open. The reason for the
1316 1319 transaction will be in ``$HG_TXNNAME``, and a unique identifier for the
1317 1320 transaction will be in ``$HG_TXNID``. A non-zero status will prevent the
1318 1321 transaction from being opened.
1319 1322
1320 1323 ``pretxnclose``
1321 1324 Run right before the transaction is actually finalized. Any repository change
1322 1325 will be visible to the hook program. This lets you validate the transaction
1323 1326 content or change it. Exit status 0 allows the commit to proceed. A non-zero
1324 1327 status will cause the transaction to be rolled back. The reason for the
1325 1328 transaction opening will be in ``$HG_TXNNAME``, and a unique identifier for
1326 1329 the transaction will be in ``$HG_TXNID``. The rest of the available data will
1327 1330 vary according the transaction type. Changes unbundled to the repository will
1328 1331 add ``$HG_URL`` and ``$HG_SOURCE``. New changesets will add ``$HG_NODE`` (the
1329 1332 ID of the first added changeset), ``$HG_NODE_LAST`` (the ID of the last added
1330 1333 changeset). Bookmark and phase changes will set ``$HG_BOOKMARK_MOVED`` and
1331 1334 ``$HG_PHASES_MOVED`` to ``1`` respectively. The number of new obsmarkers, if
1332 1335 any, will be in ``$HG_NEW_OBSMARKERS``, etc.
1333 1336
1334 1337 ``pretxnclose-bookmark``
1335 1338 Run right before a bookmark change is actually finalized. Any repository
1336 1339 change will be visible to the hook program. This lets you validate the
1337 1340 transaction content or change it. Exit status 0 allows the commit to
1338 1341 proceed. A non-zero status will cause the transaction to be rolled back.
1339 1342 The name of the bookmark will be available in ``$HG_BOOKMARK``, the new
1340 1343 bookmark location will be available in ``$HG_NODE`` while the previous
1341 1344 location will be available in ``$HG_OLDNODE``. In case of a bookmark
1342 1345 creation ``$HG_OLDNODE`` will be empty. In case of deletion ``$HG_NODE``
1343 1346 will be empty.
1344 1347 In addition, the reason for the transaction opening will be in
1345 1348 ``$HG_TXNNAME``, and a unique identifier for the transaction will be in
1346 1349 ``$HG_TXNID``.
1347 1350
1348 1351 ``pretxnclose-phase``
1349 1352 Run right before a phase change is actually finalized. Any repository change
1350 1353 will be visible to the hook program. This lets you validate the transaction
1351 1354 content or change it. Exit status 0 allows the commit to proceed. A non-zero
1352 1355 status will cause the transaction to be rolled back. The hook is called
1353 1356 multiple times, once for each revision affected by a phase change.
1354 1357 The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE``
1355 1358 while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE``
1356 1359 will be empty. In addition, the reason for the transaction opening will be in
1357 1360 ``$HG_TXNNAME``, and a unique identifier for the transaction will be in
1358 1361 ``$HG_TXNID``. The hook is also run for newly added revisions. In this case
1359 1362 the ``$HG_OLDPHASE`` entry will be empty.
1360 1363
1361 1364 ``txnclose``
1362 1365 Run after any repository transaction has been committed. At this
1363 1366 point, the transaction can no longer be rolled back. The hook will run
1364 1367 after the lock is released. See :hg:`help config.hooks.pretxnclose` for
1365 1368 details about available variables.
1366 1369
1367 1370 ``txnclose-bookmark``
1368 1371 Run after any bookmark change has been committed. At this point, the
1369 1372 transaction can no longer be rolled back. The hook will run after the lock
1370 1373 is released. See :hg:`help config.hooks.pretxnclose-bookmark` for details
1371 1374 about available variables.
1372 1375
1373 1376 ``txnclose-phase``
1374 1377 Run after any phase change has been committed. At this point, the
1375 1378 transaction can no longer be rolled back. The hook will run after the lock
1376 1379 is released. See :hg:`help config.hooks.pretxnclose-phase` for details about
1377 1380 available variables.
1378 1381
1379 1382 ``txnabort``
1380 1383 Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose`
1381 1384 for details about available variables.
1382 1385
1383 1386 ``pretxnchangegroup``
1384 1387 Run after a changegroup has been added via push, pull or unbundle, but before
1385 1388 the transaction has been committed. The changegroup is visible to the hook
1386 1389 program. This allows validation of incoming changes before accepting them.
1387 1390 The ID of the first new changeset is in ``$HG_NODE`` and last is in
1388 1391 ``$HG_NODE_LAST``. Exit status 0 allows the transaction to commit. A non-zero
1389 1392 status will cause the transaction to be rolled back, and the push, pull or
1390 1393 unbundle will fail. The URL that was the source of changes is in ``$HG_URL``.
1391 1394
1392 1395 ``pretxncommit``
1393 1396 Run after a changeset has been created, but before the transaction is
1394 1397 committed. The changeset is visible to the hook program. This allows
1395 1398 validation of the commit message and changes. Exit status 0 allows the
1396 1399 commit to proceed. A non-zero status will cause the transaction to
1397 1400 be rolled back. The ID of the new changeset is in ``$HG_NODE``. The parent
1398 1401 changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
1399 1402
1400 1403 ``preupdate``
1401 1404 Run before updating the working directory. Exit status 0 allows
1402 1405 the update to proceed. A non-zero status will prevent the update.
1403 1406 The changeset ID of first new parent is in ``$HG_PARENT1``. If updating to a
1404 1407 merge, the ID of second new parent is in ``$HG_PARENT2``.
1405 1408
1406 1409 ``listkeys``
1407 1410 Run after listing pushkeys (like bookmarks) in the repository. The
1408 1411 key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a
1409 1412 dictionary containing the keys and values.
1410 1413
1411 1414 ``pushkey``
1412 1415 Run after a pushkey (like a bookmark) is added to the
1413 1416 repository. The key namespace is in ``$HG_NAMESPACE``, the key is in
1414 1417 ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new
1415 1418 value is in ``$HG_NEW``.
1416 1419
1417 1420 ``tag``
1418 1421 Run after a tag is created. The ID of the tagged changeset is in ``$HG_NODE``.
1419 1422 The name of tag is in ``$HG_TAG``. The tag is local if ``$HG_LOCAL=1``, or in
1420 1423 the repository if ``$HG_LOCAL=0``.
1421 1424
1422 1425 ``update``
1423 1426 Run after updating the working directory. The changeset ID of first
1424 1427 new parent is in ``$HG_PARENT1``. If updating to a merge, the ID of second new
1425 1428 parent is in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
1426 1429 update failed (e.g. because conflicts were not resolved), ``$HG_ERROR=1``.
1427 1430
1428 1431 .. note::
1429 1432
1430 1433 It is generally better to use standard hooks rather than the
1431 1434 generic pre- and post- command hooks, as they are guaranteed to be
1432 1435 called in the appropriate contexts for influencing transactions.
1433 1436 Also, hooks like "commit" will be called in all contexts that
1434 1437 generate a commit (e.g. tag) and not just the commit command.
1435 1438
1436 1439 .. note::
1437 1440
1438 1441 Environment variables with empty values may not be passed to
1439 1442 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
1440 1443 will have an empty value under Unix-like platforms for non-merge
1441 1444 changesets, while it will not be available at all under Windows.
1442 1445
1443 1446 The syntax for Python hooks is as follows::
1444 1447
1445 1448 hookname = python:modulename.submodule.callable
1446 1449 hookname = python:/path/to/python/module.py:callable
1447 1450
1448 1451 Python hooks are run within the Mercurial process. Each hook is
1449 1452 called with at least three keyword arguments: a ui object (keyword
1450 1453 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
1451 1454 keyword that tells what kind of hook is used. Arguments listed as
1452 1455 environment variables above are passed as keyword arguments, with no
1453 1456 ``HG_`` prefix, and names in lower case.
1454 1457
1455 1458 If a Python hook returns a "true" value or raises an exception, this
1456 1459 is treated as a failure.
1457 1460
1458 1461
1459 1462 ``hostfingerprints``
1460 1463 --------------------
1461 1464
1462 1465 (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.)
1463 1466
1464 1467 Fingerprints of the certificates of known HTTPS servers.
1465 1468
1466 1469 A HTTPS connection to a server with a fingerprint configured here will
1467 1470 only succeed if the servers certificate matches the fingerprint.
1468 1471 This is very similar to how ssh known hosts works.
1469 1472
1470 1473 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
1471 1474 Multiple values can be specified (separated by spaces or commas). This can
1472 1475 be used to define both old and new fingerprints while a host transitions
1473 1476 to a new certificate.
1474 1477
1475 1478 The CA chain and web.cacerts is not used for servers with a fingerprint.
1476 1479
1477 1480 For example::
1478 1481
1479 1482 [hostfingerprints]
1480 1483 hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1481 1484 hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
1482 1485
1483 1486 ``hostsecurity``
1484 1487 ----------------
1485 1488
1486 1489 Used to specify global and per-host security settings for connecting to
1487 1490 other machines.
1488 1491
1489 1492 The following options control default behavior for all hosts.
1490 1493
1491 1494 ``ciphers``
1492 1495 Defines the cryptographic ciphers to use for connections.
1493 1496
1494 1497 Value must be a valid OpenSSL Cipher List Format as documented at
1495 1498 https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT.
1496 1499
1497 1500 This setting is for advanced users only. Setting to incorrect values
1498 1501 can significantly lower connection security or decrease performance.
1499 1502 You have been warned.
1500 1503
1501 1504 This option requires Python 2.7.
1502 1505
1503 1506 ``minimumprotocol``
1504 1507 Defines the minimum channel encryption protocol to use.
1505 1508
1506 1509 By default, the highest version of TLS supported by both client and server
1507 1510 is used.
1508 1511
1509 1512 Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``.
1510 1513
1511 1514 When running on an old Python version, only ``tls1.0`` is allowed since
1512 1515 old versions of Python only support up to TLS 1.0.
1513 1516
1514 1517 When running a Python that supports modern TLS versions, the default is
1515 1518 ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this
1516 1519 weakens security and should only be used as a feature of last resort if
1517 1520 a server does not support TLS 1.1+.
1518 1521
1519 1522 Options in the ``[hostsecurity]`` section can have the form
1520 1523 ``hostname``:``setting``. This allows multiple settings to be defined on a
1521 1524 per-host basis.
1522 1525
1523 1526 The following per-host settings can be defined.
1524 1527
1525 1528 ``ciphers``
1526 1529 This behaves like ``ciphers`` as described above except it only applies
1527 1530 to the host on which it is defined.
1528 1531
1529 1532 ``fingerprints``
1530 1533 A list of hashes of the DER encoded peer/remote certificate. Values have
1531 1534 the form ``algorithm``:``fingerprint``. e.g.
1532 1535 ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``.
1533 1536 In addition, colons (``:``) can appear in the fingerprint part.
1534 1537
1535 1538 The following algorithms/prefixes are supported: ``sha1``, ``sha256``,
1536 1539 ``sha512``.
1537 1540
1538 1541 Use of ``sha256`` or ``sha512`` is preferred.
1539 1542
1540 1543 If a fingerprint is specified, the CA chain is not validated for this
1541 1544 host and Mercurial will require the remote certificate to match one
1542 1545 of the fingerprints specified. This means if the server updates its
1543 1546 certificate, Mercurial will abort until a new fingerprint is defined.
1544 1547 This can provide stronger security than traditional CA-based validation
1545 1548 at the expense of convenience.
1546 1549
1547 1550 This option takes precedence over ``verifycertsfile``.
1548 1551
1549 1552 ``minimumprotocol``
1550 1553 This behaves like ``minimumprotocol`` as described above except it
1551 1554 only applies to the host on which it is defined.
1552 1555
1553 1556 ``verifycertsfile``
1554 1557 Path to file a containing a list of PEM encoded certificates used to
1555 1558 verify the server certificate. Environment variables and ``~user``
1556 1559 constructs are expanded in the filename.
1557 1560
1558 1561 The server certificate or the certificate's certificate authority (CA)
1559 1562 must match a certificate from this file or certificate verification
1560 1563 will fail and connections to the server will be refused.
1561 1564
1562 1565 If defined, only certificates provided by this file will be used:
1563 1566 ``web.cacerts`` and any system/default certificates will not be
1564 1567 used.
1565 1568
1566 1569 This option has no effect if the per-host ``fingerprints`` option
1567 1570 is set.
1568 1571
1569 1572 The format of the file is as follows::
1570 1573
1571 1574 -----BEGIN CERTIFICATE-----
1572 1575 ... (certificate in base64 PEM encoding) ...
1573 1576 -----END CERTIFICATE-----
1574 1577 -----BEGIN CERTIFICATE-----
1575 1578 ... (certificate in base64 PEM encoding) ...
1576 1579 -----END CERTIFICATE-----
1577 1580
1578 1581 For example::
1579 1582
1580 1583 [hostsecurity]
1581 1584 hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
1582 1585 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
1583 1586 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
1584 1587 foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem
1585 1588
1586 1589 To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1
1587 1590 when connecting to ``hg.example.com``::
1588 1591
1589 1592 [hostsecurity]
1590 1593 minimumprotocol = tls1.2
1591 1594 hg.example.com:minimumprotocol = tls1.1
1592 1595
1593 1596 ``http_proxy``
1594 1597 --------------
1595 1598
1596 1599 Used to access web-based Mercurial repositories through a HTTP
1597 1600 proxy.
1598 1601
1599 1602 ``host``
1600 1603 Host name and (optional) port of the proxy server, for example
1601 1604 "myproxy:8000".
1602 1605
1603 1606 ``no``
1604 1607 Optional. Comma-separated list of host names that should bypass
1605 1608 the proxy.
1606 1609
1607 1610 ``passwd``
1608 1611 Optional. Password to authenticate with at the proxy server.
1609 1612
1610 1613 ``user``
1611 1614 Optional. User name to authenticate with at the proxy server.
1612 1615
1613 1616 ``always``
1614 1617 Optional. Always use the proxy, even for localhost and any entries
1615 1618 in ``http_proxy.no``. (default: False)
1616 1619
1617 1620 ``http``
1618 1621 ----------
1619 1622
1620 1623 Used to configure access to Mercurial repositories via HTTP.
1621 1624
1622 1625 ``timeout``
1623 1626 If set, blocking operations will timeout after that many seconds.
1624 1627 (default: None)
1625 1628
1626 1629 ``merge``
1627 1630 ---------
1628 1631
1629 1632 This section specifies behavior during merges and updates.
1630 1633
1631 1634 ``checkignored``
1632 1635 Controls behavior when an ignored file on disk has the same name as a tracked
1633 1636 file in the changeset being merged or updated to, and has different
1634 1637 contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``,
1635 1638 abort on such files. With ``warn``, warn on such files and back them up as
1636 1639 ``.orig``. With ``ignore``, don't print a warning and back them up as
1637 1640 ``.orig``. (default: ``abort``)
1638 1641
1639 1642 ``checkunknown``
1640 1643 Controls behavior when an unknown file that isn't ignored has the same name
1641 1644 as a tracked file in the changeset being merged or updated to, and has
1642 1645 different contents. Similar to ``merge.checkignored``, except for files that
1643 1646 are not ignored. (default: ``abort``)
1644 1647
1645 1648 ``on-failure``
1646 1649 When set to ``continue`` (the default), the merge process attempts to
1647 1650 merge all unresolved files using the merge chosen tool, regardless of
1648 1651 whether previous file merge attempts during the process succeeded or not.
1649 1652 Setting this to ``prompt`` will prompt after any merge failure continue
1650 1653 or halt the merge process. Setting this to ``halt`` will automatically
1651 1654 halt the merge process on any merge tool failure. The merge process
1652 1655 can be restarted by using the ``resolve`` command. When a merge is
1653 1656 halted, the repository is left in a normal ``unresolved`` merge state.
1654 1657 (default: ``continue``)
1655 1658
1656 1659 ``strict-capability-check``
1657 1660 Whether capabilities of internal merge tools are checked strictly
1658 1661 or not, while examining rules to decide merge tool to be used.
1659 1662 (default: False)
1660 1663
1661 1664 ``merge-patterns``
1662 1665 ------------------
1663 1666
1664 1667 This section specifies merge tools to associate with particular file
1665 1668 patterns. Tools matched here will take precedence over the default
1666 1669 merge tool. Patterns are globs by default, rooted at the repository
1667 1670 root.
1668 1671
1669 1672 Example::
1670 1673
1671 1674 [merge-patterns]
1672 1675 **.c = kdiff3
1673 1676 **.jpg = myimgmerge
1674 1677
1675 1678 ``merge-tools``
1676 1679 ---------------
1677 1680
1678 1681 This section configures external merge tools to use for file-level
1679 1682 merges. This section has likely been preconfigured at install time.
1680 1683 Use :hg:`config merge-tools` to check the existing configuration.
1681 1684 Also see :hg:`help merge-tools` for more details.
1682 1685
1683 1686 Example ``~/.hgrc``::
1684 1687
1685 1688 [merge-tools]
1686 1689 # Override stock tool location
1687 1690 kdiff3.executable = ~/bin/kdiff3
1688 1691 # Specify command line
1689 1692 kdiff3.args = $base $local $other -o $output
1690 1693 # Give higher priority
1691 1694 kdiff3.priority = 1
1692 1695
1693 1696 # Changing the priority of preconfigured tool
1694 1697 meld.priority = 0
1695 1698
1696 1699 # Disable a preconfigured tool
1697 1700 vimdiff.disabled = yes
1698 1701
1699 1702 # Define new tool
1700 1703 myHtmlTool.args = -m $local $other $base $output
1701 1704 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
1702 1705 myHtmlTool.priority = 1
1703 1706
1704 1707 Supported arguments:
1705 1708
1706 1709 ``priority``
1707 1710 The priority in which to evaluate this tool.
1708 1711 (default: 0)
1709 1712
1710 1713 ``executable``
1711 1714 Either just the name of the executable or its pathname.
1712 1715
1713 1716 .. container:: windows
1714 1717
1715 1718 On Windows, the path can use environment variables with ${ProgramFiles}
1716 1719 syntax.
1717 1720
1718 1721 (default: the tool name)
1719 1722
1720 1723 ``args``
1721 1724 The arguments to pass to the tool executable. You can refer to the
1722 1725 files being merged as well as the output file through these
1723 1726 variables: ``$base``, ``$local``, ``$other``, ``$output``.
1724 1727
1725 1728 The meaning of ``$local`` and ``$other`` can vary depending on which action is
1726 1729 being performed. During an update or merge, ``$local`` represents the original
1727 1730 state of the file, while ``$other`` represents the commit you are updating to or
1728 1731 the commit you are merging with. During a rebase, ``$local`` represents the
1729 1732 destination of the rebase, and ``$other`` represents the commit being rebased.
1730 1733
1731 1734 Some operations define custom labels to assist with identifying the revisions,
1732 1735 accessible via ``$labellocal``, ``$labelother``, and ``$labelbase``. If custom
1733 1736 labels are not available, these will be ``local``, ``other``, and ``base``,
1734 1737 respectively.
1735 1738 (default: ``$local $base $other``)
1736 1739
1737 1740 ``premerge``
1738 1741 Attempt to run internal non-interactive 3-way merge tool before
1739 1742 launching external tool. Options are ``true``, ``false``, ``keep``,
1740 1743 ``keep-merge3``, or ``keep-mergediff`` (experimental). The ``keep`` option
1741 1744 will leave markers in the file if the premerge fails. The ``keep-merge3``
1742 1745 will do the same but include information about the base of the merge in the
1743 1746 marker (see internal :merge3 in :hg:`help merge-tools`). The
1744 1747 ``keep-mergediff`` option is similar but uses a different marker style
1745 1748 (see internal :merge3 in :hg:`help merge-tools`). (default: True)
1746 1749
1747 1750 ``binary``
1748 1751 This tool can merge binary files. (default: False, unless tool
1749 1752 was selected by file pattern match)
1750 1753
1751 1754 ``symlink``
1752 1755 This tool can merge symlinks. (default: False)
1753 1756
1754 1757 ``check``
1755 1758 A list of merge success-checking options:
1756 1759
1757 1760 ``changed``
1758 1761 Ask whether merge was successful when the merged file shows no changes.
1759 1762 ``conflicts``
1760 1763 Check whether there are conflicts even though the tool reported success.
1761 1764 ``prompt``
1762 1765 Always prompt for merge success, regardless of success reported by tool.
1763 1766
1764 1767 ``fixeol``
1765 1768 Attempt to fix up EOL changes caused by the merge tool.
1766 1769 (default: False)
1767 1770
1768 1771 ``gui``
1769 1772 This tool requires a graphical interface to run. (default: False)
1770 1773
1771 1774 ``mergemarkers``
1772 1775 Controls whether the labels passed via ``$labellocal``, ``$labelother``, and
1773 1776 ``$labelbase`` are ``detailed`` (respecting ``mergemarkertemplate``) or
1774 1777 ``basic``. If ``premerge`` is ``keep`` or ``keep-merge3``, the conflict
1775 1778 markers generated during premerge will be ``detailed`` if either this option or
1776 1779 the corresponding option in the ``[ui]`` section is ``detailed``.
1777 1780 (default: ``basic``)
1778 1781
1779 1782 ``mergemarkertemplate``
1780 1783 This setting can be used to override ``mergemarker`` from the
1781 1784 ``[command-templates]`` section on a per-tool basis; this applies to the
1782 1785 ``$label``-prefixed variables and to the conflict markers that are generated
1783 1786 if ``premerge`` is ``keep` or ``keep-merge3``. See the corresponding variable
1784 1787 in ``[ui]`` for more information.
1785 1788
1786 1789 .. container:: windows
1787 1790
1788 1791 ``regkey``
1789 1792 Windows registry key which describes install location of this
1790 1793 tool. Mercurial will search for this key first under
1791 1794 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
1792 1795 (default: None)
1793 1796
1794 1797 ``regkeyalt``
1795 1798 An alternate Windows registry key to try if the first key is not
1796 1799 found. The alternate key uses the same ``regname`` and ``regappend``
1797 1800 semantics of the primary key. The most common use for this key
1798 1801 is to search for 32bit applications on 64bit operating systems.
1799 1802 (default: None)
1800 1803
1801 1804 ``regname``
1802 1805 Name of value to read from specified registry key.
1803 1806 (default: the unnamed (default) value)
1804 1807
1805 1808 ``regappend``
1806 1809 String to append to the value read from the registry, typically
1807 1810 the executable name of the tool.
1808 1811 (default: None)
1809 1812
1810 1813 ``pager``
1811 1814 ---------
1812 1815
1813 1816 Setting used to control when to paginate and with what external tool. See
1814 1817 :hg:`help pager` for details.
1815 1818
1816 1819 ``pager``
1817 1820 Define the external tool used as pager.
1818 1821
1819 1822 If no pager is set, Mercurial uses the environment variable $PAGER.
1820 1823 If neither pager.pager, nor $PAGER is set, a default pager will be
1821 1824 used, typically `less` on Unix and `more` on Windows. Example::
1822 1825
1823 1826 [pager]
1824 1827 pager = less -FRX
1825 1828
1826 1829 ``ignore``
1827 1830 List of commands to disable the pager for. Example::
1828 1831
1829 1832 [pager]
1830 1833 ignore = version, help, update
1831 1834
1832 1835 ``patch``
1833 1836 ---------
1834 1837
1835 1838 Settings used when applying patches, for instance through the 'import'
1836 1839 command or with Mercurial Queues extension.
1837 1840
1838 1841 ``eol``
1839 1842 When set to 'strict' patch content and patched files end of lines
1840 1843 are preserved. When set to ``lf`` or ``crlf``, both files end of
1841 1844 lines are ignored when patching and the result line endings are
1842 1845 normalized to either LF (Unix) or CRLF (Windows). When set to
1843 1846 ``auto``, end of lines are again ignored while patching but line
1844 1847 endings in patched files are normalized to their original setting
1845 1848 on a per-file basis. If target file does not exist or has no end
1846 1849 of line, patch line endings are preserved.
1847 1850 (default: strict)
1848 1851
1849 1852 ``fuzz``
1850 1853 The number of lines of 'fuzz' to allow when applying patches. This
1851 1854 controls how much context the patcher is allowed to ignore when
1852 1855 trying to apply a patch.
1853 1856 (default: 2)
1854 1857
1855 1858 ``paths``
1856 1859 ---------
1857 1860
1858 1861 Assigns symbolic names and behavior to repositories.
1859 1862
1860 1863 Options are symbolic names defining the URL or directory that is the
1861 1864 location of the repository. Example::
1862 1865
1863 1866 [paths]
1864 1867 my_server = https://example.com/my_repo
1865 1868 local_path = /home/me/repo
1866 1869
1867 1870 These symbolic names can be used from the command line. To pull
1868 1871 from ``my_server``: :hg:`pull my_server`. To push to ``local_path``:
1869 1872 :hg:`push local_path`. You can check :hg:`help urls` for details about
1870 1873 valid URLs.
1871 1874
1872 1875 Options containing colons (``:``) denote sub-options that can influence
1873 1876 behavior for that specific path. Example::
1874 1877
1875 1878 [paths]
1876 1879 my_server = https://example.com/my_path
1877 1880 my_server:pushurl = ssh://example.com/my_path
1878 1881
1879 1882 Paths using the `path://otherpath` scheme will inherit the sub-options value from
1880 1883 the path they point to.
1881 1884
1882 1885 The following sub-options can be defined:
1883 1886
1884 1887 ``multi-urls``
1885 1888 A boolean option. When enabled the value of the `[paths]` entry will be
1886 1889 parsed as a list and the alias will resolve to multiple destination. If some
1887 1890 of the list entry use the `path://` syntax, the suboption will be inherited
1888 1891 individually.
1889 1892
1890 1893 ``pushurl``
1891 1894 The URL to use for push operations. If not defined, the location
1892 1895 defined by the path's main entry is used.
1893 1896
1894 1897 ``pushrev``
1895 1898 A revset defining which revisions to push by default.
1896 1899
1897 1900 When :hg:`push` is executed without a ``-r`` argument, the revset
1898 1901 defined by this sub-option is evaluated to determine what to push.
1899 1902
1900 1903 For example, a value of ``.`` will push the working directory's
1901 1904 revision by default.
1902 1905
1903 1906 Revsets specifying bookmarks will not result in the bookmark being
1904 1907 pushed.
1905 1908
1906 1909 ``bookmarks.mode``
1907 1910 How bookmark will be dealt during the exchange. It support the following value
1908 1911
1909 1912 - ``default``: the default behavior, local and remote bookmarks are "merged"
1910 1913 on push/pull.
1911 1914
1912 1915 - ``mirror``: when pulling, replace local bookmarks by remote bookmarks. This
1913 1916 is useful to replicate a repository, or as an optimization.
1914 1917
1915 1918 - ``ignore``: ignore bookmarks during exchange.
1916 1919 (This currently only affect pulling)
1917 1920
1918 1921 The following special named paths exist:
1919 1922
1920 1923 ``default``
1921 1924 The URL or directory to use when no source or remote is specified.
1922 1925
1923 1926 :hg:`clone` will automatically define this path to the location the
1924 1927 repository was cloned from.
1925 1928
1926 1929 ``default-push``
1927 1930 (deprecated) The URL or directory for the default :hg:`push` location.
1928 1931 ``default:pushurl`` should be used instead.
1929 1932
1930 1933 ``phases``
1931 1934 ----------
1932 1935
1933 1936 Specifies default handling of phases. See :hg:`help phases` for more
1934 1937 information about working with phases.
1935 1938
1936 1939 ``publish``
1937 1940 Controls draft phase behavior when working as a server. When true,
1938 1941 pushed changesets are set to public in both client and server and
1939 1942 pulled or cloned changesets are set to public in the client.
1940 1943 (default: True)
1941 1944
1942 1945 ``new-commit``
1943 1946 Phase of newly-created commits.
1944 1947 (default: draft)
1945 1948
1946 1949 ``checksubrepos``
1947 1950 Check the phase of the current revision of each subrepository. Allowed
1948 1951 values are "ignore", "follow" and "abort". For settings other than
1949 1952 "ignore", the phase of the current revision of each subrepository is
1950 1953 checked before committing the parent repository. If any of those phases is
1951 1954 greater than the phase of the parent repository (e.g. if a subrepo is in a
1952 1955 "secret" phase while the parent repo is in "draft" phase), the commit is
1953 1956 either aborted (if checksubrepos is set to "abort") or the higher phase is
1954 1957 used for the parent repository commit (if set to "follow").
1955 1958 (default: follow)
1956 1959
1957 1960
1958 1961 ``profiling``
1959 1962 -------------
1960 1963
1961 1964 Specifies profiling type, format, and file output. Two profilers are
1962 1965 supported: an instrumenting profiler (named ``ls``), and a sampling
1963 1966 profiler (named ``stat``).
1964 1967
1965 1968 In this section description, 'profiling data' stands for the raw data
1966 1969 collected during profiling, while 'profiling report' stands for a
1967 1970 statistical text report generated from the profiling data.
1968 1971
1969 1972 ``enabled``
1970 1973 Enable the profiler.
1971 1974 (default: false)
1972 1975
1973 1976 This is equivalent to passing ``--profile`` on the command line.
1974 1977
1975 1978 ``type``
1976 1979 The type of profiler to use.
1977 1980 (default: stat)
1978 1981
1979 1982 ``ls``
1980 1983 Use Python's built-in instrumenting profiler. This profiler
1981 1984 works on all platforms, but each line number it reports is the
1982 1985 first line of a function. This restriction makes it difficult to
1983 1986 identify the expensive parts of a non-trivial function.
1984 1987 ``stat``
1985 1988 Use a statistical profiler, statprof. This profiler is most
1986 1989 useful for profiling commands that run for longer than about 0.1
1987 1990 seconds.
1988 1991
1989 1992 ``format``
1990 1993 Profiling format. Specific to the ``ls`` instrumenting profiler.
1991 1994 (default: text)
1992 1995
1993 1996 ``text``
1994 1997 Generate a profiling report. When saving to a file, it should be
1995 1998 noted that only the report is saved, and the profiling data is
1996 1999 not kept.
1997 2000 ``kcachegrind``
1998 2001 Format profiling data for kcachegrind use: when saving to a
1999 2002 file, the generated file can directly be loaded into
2000 2003 kcachegrind.
2001 2004
2002 2005 ``statformat``
2003 2006 Profiling format for the ``stat`` profiler.
2004 2007 (default: hotpath)
2005 2008
2006 2009 ``hotpath``
2007 2010 Show a tree-based display containing the hot path of execution (where
2008 2011 most time was spent).
2009 2012 ``bymethod``
2010 2013 Show a table of methods ordered by how frequently they are active.
2011 2014 ``byline``
2012 2015 Show a table of lines in files ordered by how frequently they are active.
2013 2016 ``json``
2014 2017 Render profiling data as JSON.
2015 2018
2016 2019 ``freq``
2017 2020 Sampling frequency. Specific to the ``stat`` sampling profiler.
2018 2021 (default: 1000)
2019 2022
2020 2023 ``output``
2021 2024 File path where profiling data or report should be saved. If the
2022 2025 file exists, it is replaced. (default: None, data is printed on
2023 2026 stderr)
2024 2027
2025 2028 ``sort``
2026 2029 Sort field. Specific to the ``ls`` instrumenting profiler.
2027 2030 One of ``callcount``, ``reccallcount``, ``totaltime`` and
2028 2031 ``inlinetime``.
2029 2032 (default: inlinetime)
2030 2033
2031 2034 ``time-track``
2032 2035 Control if the stat profiler track ``cpu`` or ``real`` time.
2033 2036 (default: ``cpu`` on Windows, otherwise ``real``)
2034 2037
2035 2038 ``limit``
2036 2039 Number of lines to show. Specific to the ``ls`` instrumenting profiler.
2037 2040 (default: 30)
2038 2041
2039 2042 ``nested``
2040 2043 Show at most this number of lines of drill-down info after each main entry.
2041 2044 This can help explain the difference between Total and Inline.
2042 2045 Specific to the ``ls`` instrumenting profiler.
2043 2046 (default: 0)
2044 2047
2045 2048 ``showmin``
2046 2049 Minimum fraction of samples an entry must have for it to be displayed.
2047 2050 Can be specified as a float between ``0.0`` and ``1.0`` or can have a
2048 2051 ``%`` afterwards to allow values up to ``100``. e.g. ``5%``.
2049 2052
2050 2053 Only used by the ``stat`` profiler.
2051 2054
2052 2055 For the ``hotpath`` format, default is ``0.05``.
2053 2056 For the ``chrome`` format, default is ``0.005``.
2054 2057
2055 2058 The option is unused on other formats.
2056 2059
2057 2060 ``showmax``
2058 2061 Maximum fraction of samples an entry can have before it is ignored in
2059 2062 display. Values format is the same as ``showmin``.
2060 2063
2061 2064 Only used by the ``stat`` profiler.
2062 2065
2063 2066 For the ``chrome`` format, default is ``0.999``.
2064 2067
2065 2068 The option is unused on other formats.
2066 2069
2067 2070 ``showtime``
2068 2071 Show time taken as absolute durations, in addition to percentages.
2069 2072 Only used by the ``hotpath`` format.
2070 2073 (default: true)
2071 2074
2072 2075 ``progress``
2073 2076 ------------
2074 2077
2075 2078 Mercurial commands can draw progress bars that are as informative as
2076 2079 possible. Some progress bars only offer indeterminate information, while others
2077 2080 have a definite end point.
2078 2081
2079 2082 ``debug``
2080 2083 Whether to print debug info when updating the progress bar. (default: False)
2081 2084
2082 2085 ``delay``
2083 2086 Number of seconds (float) before showing the progress bar. (default: 3)
2084 2087
2085 2088 ``changedelay``
2086 2089 Minimum delay before showing a new topic. When set to less than 3 * refresh,
2087 2090 that value will be used instead. (default: 1)
2088 2091
2089 2092 ``estimateinterval``
2090 2093 Maximum sampling interval in seconds for speed and estimated time
2091 2094 calculation. (default: 60)
2092 2095
2093 2096 ``refresh``
2094 2097 Time in seconds between refreshes of the progress bar. (default: 0.1)
2095 2098
2096 2099 ``format``
2097 2100 Format of the progress bar.
2098 2101
2099 2102 Valid entries for the format field are ``topic``, ``bar``, ``number``,
2100 2103 ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the
2101 2104 last 20 characters of the item, but this can be changed by adding either
2102 2105 ``-<num>`` which would take the last num characters, or ``+<num>`` for the
2103 2106 first num characters.
2104 2107
2105 2108 (default: topic bar number estimate)
2106 2109
2107 2110 ``width``
2108 2111 If set, the maximum width of the progress information (that is, min(width,
2109 2112 term width) will be used).
2110 2113
2111 2114 ``clear-complete``
2112 2115 Clear the progress bar after it's done. (default: True)
2113 2116
2114 2117 ``disable``
2115 2118 If true, don't show a progress bar.
2116 2119
2117 2120 ``assume-tty``
2118 2121 If true, ALWAYS show a progress bar, unless disable is given.
2119 2122
2120 2123 ``rebase``
2121 2124 ----------
2122 2125
2123 2126 ``evolution.allowdivergence``
2124 2127 Default to False, when True allow creating divergence when performing
2125 2128 rebase of obsolete changesets.
2126 2129
2127 2130 ``revsetalias``
2128 2131 ---------------
2129 2132
2130 2133 Alias definitions for revsets. See :hg:`help revsets` for details.
2131 2134
2132 2135 ``rewrite``
2133 2136 -----------
2134 2137
2135 2138 ``backup-bundle``
2136 2139 Whether to save stripped changesets to a bundle file. (default: True)
2137 2140
2138 2141 ``update-timestamp``
2139 2142 If true, updates the date and time of the changeset to current. It is only
2140 2143 applicable for `hg amend`, `hg commit --amend` and `hg uncommit` in the
2141 2144 current version.
2142 2145
2143 2146 ``empty-successor``
2144 2147
2145 2148 Control what happens with empty successors that are the result of rewrite
2146 2149 operations. If set to ``skip``, the successor is not created. If set to
2147 2150 ``keep``, the empty successor is created and kept.
2148 2151
2149 2152 Currently, only the rebase and absorb commands consider this configuration.
2150 2153 (EXPERIMENTAL)
2151 2154
2152 2155 ``share``
2153 2156 ---------
2154 2157
2155 2158 ``safe-mismatch.source-safe``
2156 2159 Controls what happens when the shared repository does not use the
2157 2160 share-safe mechanism but its source repository does.
2158 2161
2159 2162 Possible values are `abort` (default), `allow`, `upgrade-abort` and
2160 2163 `upgrade-allow`.
2161 2164
2162 2165 ``abort``
2163 2166 Disallows running any command and aborts
2164 2167 ``allow``
2165 2168 Respects the feature presence in the share source
2166 2169 ``upgrade-abort``
2167 2170 tries to upgrade the share to use share-safe; if it fails, aborts
2168 2171 ``upgrade-allow``
2169 2172 tries to upgrade the share; if it fails, continue by
2170 2173 respecting the share source setting
2171 2174
2172 2175 Check :hg:`help config.format.use-share-safe` for details about the
2173 2176 share-safe feature.
2174 2177
2175 2178 ``safe-mismatch.source-safe.warn``
2176 2179 Shows a warning on operations if the shared repository does not use
2177 2180 share-safe, but the source repository does.
2178 2181 (default: True)
2179 2182
2180 2183 ``safe-mismatch.source-not-safe``
2181 2184 Controls what happens when the shared repository uses the share-safe
2182 2185 mechanism but its source does not.
2183 2186
2184 2187 Possible values are `abort` (default), `allow`, `downgrade-abort` and
2185 2188 `downgrade-allow`.
2186 2189
2187 2190 ``abort``
2188 2191 Disallows running any command and aborts
2189 2192 ``allow``
2190 2193 Respects the feature presence in the share source
2191 2194 ``downgrade-abort``
2192 2195 tries to downgrade the share to not use share-safe; if it fails, aborts
2193 2196 ``downgrade-allow``
2194 2197 tries to downgrade the share to not use share-safe;
2195 2198 if it fails, continue by respecting the shared source setting
2196 2199
2197 2200 Check :hg:`help config.format.use-share-safe` for details about the
2198 2201 share-safe feature.
2199 2202
2200 2203 ``safe-mismatch.source-not-safe.warn``
2201 2204 Shows a warning on operations if the shared repository uses share-safe,
2202 2205 but the source repository does not.
2203 2206 (default: True)
2204 2207
2205 2208 ``storage``
2206 2209 -----------
2207 2210
2208 2211 Control the strategy Mercurial uses internally to store history. Options in this
2209 2212 category impact performance and repository size.
2210 2213
2211 2214 ``revlog.issue6528.fix-incoming``
2212 2215 Version 5.8 of Mercurial had a bug leading to altering the parent of file
2213 2216 revision with copy information (or any other metadata) on exchange. This
2214 2217 leads to the copy metadata to be overlooked by various internal logic. The
2215 2218 issue was fixed in Mercurial 5.8.1.
2216 2219 (See https://bz.mercurial-scm.org/show_bug.cgi?id=6528 for details)
2217 2220
2218 2221 As a result Mercurial is now checking and fixing incoming file revisions to
2219 2222 make sure there parents are in the right order. This behavior can be
2220 2223 disabled by setting this option to `no`. This apply to revisions added
2221 2224 through push, pull, clone and unbundle.
2222 2225
2223 2226 To fix affected revisions that already exist within the repository, one can
2224 2227 use :hg:`debug-repair-issue-6528`.
2225 2228
2226 2229 ``revlog.optimize-delta-parent-choice``
2227 2230 When storing a merge revision, both parents will be equally considered as
2228 2231 a possible delta base. This results in better delta selection and improved
2229 2232 revlog compression. This option is enabled by default.
2230 2233
2231 2234 Turning this option off can result in large increase of repository size for
2232 2235 repository with many merges.
2233 2236
2234 2237 ``revlog.persistent-nodemap.mmap``
2235 2238 Whether to use the Operating System "memory mapping" feature (when
2236 2239 possible) to access the persistent nodemap data. This improve performance
2237 2240 and reduce memory pressure.
2238 2241
2239 2242 Default to True.
2240 2243
2241 2244 For details on the "persistent-nodemap" feature, see:
2242 2245 :hg:`help config.format.use-persistent-nodemap`.
2243 2246
2244 2247 ``revlog.persistent-nodemap.slow-path``
2245 2248 Control the behavior of Merucrial when using a repository with "persistent"
2246 2249 nodemap with an installation of Mercurial without a fast implementation for
2247 2250 the feature:
2248 2251
2249 2252 ``allow``: Silently use the slower implementation to access the repository.
2250 2253 ``warn``: Warn, but use the slower implementation to access the repository.
2251 2254 ``abort``: Prevent access to such repositories. (This is the default)
2252 2255
2253 2256 For details on the "persistent-nodemap" feature, see:
2254 2257 :hg:`help config.format.use-persistent-nodemap`.
2255 2258
2256 2259 ``revlog.reuse-external-delta-parent``
2257 2260 Control the order in which delta parents are considered when adding new
2258 2261 revisions from an external source.
2259 2262 (typically: apply bundle from `hg pull` or `hg push`).
2260 2263
2261 2264 New revisions are usually provided as a delta against other revisions. By
2262 2265 default, Mercurial will try to reuse this delta first, therefore using the
2263 2266 same "delta parent" as the source. Directly using delta's from the source
2264 2267 reduces CPU usage and usually speeds up operation. However, in some case,
2265 2268 the source might have sub-optimal delta bases and forcing their reevaluation
2266 2269 is useful. For example, pushes from an old client could have sub-optimal
2267 2270 delta's parent that the server want to optimize. (lack of general delta, bad
2268 2271 parents, choice, lack of sparse-revlog, etc).
2269 2272
2270 2273 This option is enabled by default. Turning it off will ensure bad delta
2271 2274 parent choices from older client do not propagate to this repository, at
2272 2275 the cost of a small increase in CPU consumption.
2273 2276
2274 2277 Note: this option only control the order in which delta parents are
2275 2278 considered. Even when disabled, the existing delta from the source will be
2276 2279 reused if the same delta parent is selected.
2277 2280
2278 2281 ``revlog.reuse-external-delta``
2279 2282 Control the reuse of delta from external source.
2280 2283 (typically: apply bundle from `hg pull` or `hg push`).
2281 2284
2282 2285 New revisions are usually provided as a delta against another revision. By
2283 2286 default, Mercurial will not recompute the same delta again, trusting
2284 2287 externally provided deltas. There have been rare cases of small adjustment
2285 2288 to the diffing algorithm in the past. So in some rare case, recomputing
2286 2289 delta provided by ancient clients can provides better results. Disabling
2287 2290 this option means going through a full delta recomputation for all incoming
2288 2291 revisions. It means a large increase in CPU usage and will slow operations
2289 2292 down.
2290 2293
2291 2294 This option is enabled by default. When disabled, it also disables the
2292 2295 related ``storage.revlog.reuse-external-delta-parent`` option.
2293 2296
2294 2297 ``revlog.zlib.level``
2295 2298 Zlib compression level used when storing data into the repository. Accepted
2296 2299 Value range from 1 (lowest compression) to 9 (highest compression). Zlib
2297 2300 default value is 6.
2298 2301
2299 2302
2300 2303 ``revlog.zstd.level``
2301 2304 zstd compression level used when storing data into the repository. Accepted
2302 2305 Value range from 1 (lowest compression) to 22 (highest compression).
2303 2306 (default 3)
2304 2307
2305 2308 ``server``
2306 2309 ----------
2307 2310
2308 2311 Controls generic server settings.
2309 2312
2310 2313 ``bookmarks-pushkey-compat``
2311 2314 Trigger pushkey hook when being pushed bookmark updates. This config exist
2312 2315 for compatibility purpose (default to True)
2313 2316
2314 2317 If you use ``pushkey`` and ``pre-pushkey`` hooks to control bookmark
2315 2318 movement we recommend you migrate them to ``txnclose-bookmark`` and
2316 2319 ``pretxnclose-bookmark``.
2317 2320
2318 2321 ``compressionengines``
2319 2322 List of compression engines and their relative priority to advertise
2320 2323 to clients.
2321 2324
2322 2325 The order of compression engines determines their priority, the first
2323 2326 having the highest priority. If a compression engine is not listed
2324 2327 here, it won't be advertised to clients.
2325 2328
2326 2329 If not set (the default), built-in defaults are used. Run
2327 2330 :hg:`debuginstall` to list available compression engines and their
2328 2331 default wire protocol priority.
2329 2332
2330 2333 Older Mercurial clients only support zlib compression and this setting
2331 2334 has no effect for legacy clients.
2332 2335
2333 2336 ``uncompressed``
2334 2337 Whether to allow clients to clone a repository using the
2335 2338 uncompressed streaming protocol. This transfers about 40% more
2336 2339 data than a regular clone, but uses less memory and CPU on both
2337 2340 server and client. Over a LAN (100 Mbps or better) or a very fast
2338 2341 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
2339 2342 regular clone. Over most WAN connections (anything slower than
2340 2343 about 6 Mbps), uncompressed streaming is slower, because of the
2341 2344 extra data transfer overhead. This mode will also temporarily hold
2342 2345 the write lock while determining what data to transfer.
2343 2346 (default: True)
2344 2347
2345 2348 ``uncompressedallowsecret``
2346 2349 Whether to allow stream clones when the repository contains secret
2347 2350 changesets. (default: False)
2348 2351
2349 2352 ``preferuncompressed``
2350 2353 When set, clients will try to use the uncompressed streaming
2351 2354 protocol. (default: False)
2352 2355
2353 2356 ``disablefullbundle``
2354 2357 When set, servers will refuse attempts to do pull-based clones.
2355 2358 If this option is set, ``preferuncompressed`` and/or clone bundles
2356 2359 are highly recommended. Partial clones will still be allowed.
2357 2360 (default: False)
2358 2361
2359 2362 ``streamunbundle``
2360 2363 When set, servers will apply data sent from the client directly,
2361 2364 otherwise it will be written to a temporary file first. This option
2362 2365 effectively prevents concurrent pushes.
2363 2366
2364 2367 ``pullbundle``
2365 2368 When set, the server will check pullbundles.manifest for bundles
2366 2369 covering the requested heads and common nodes. The first matching
2367 2370 entry will be streamed to the client.
2368 2371
2369 2372 For HTTP transport, the stream will still use zlib compression
2370 2373 for older clients.
2371 2374
2372 2375 ``concurrent-push-mode``
2373 2376 Level of allowed race condition between two pushing clients.
2374 2377
2375 2378 - 'strict': push is abort if another client touched the repository
2376 2379 while the push was preparing.
2377 2380 - 'check-related': push is only aborted if it affects head that got also
2378 2381 affected while the push was preparing. (default since 5.4)
2379 2382
2380 2383 'check-related' only takes effect for compatible clients (version
2381 2384 4.3 and later). Older clients will use 'strict'.
2382 2385
2383 2386 ``validate``
2384 2387 Whether to validate the completeness of pushed changesets by
2385 2388 checking that all new file revisions specified in manifests are
2386 2389 present. (default: False)
2387 2390
2388 2391 ``maxhttpheaderlen``
2389 2392 Instruct HTTP clients not to send request headers longer than this
2390 2393 many bytes. (default: 1024)
2391 2394
2392 2395 ``bundle1``
2393 2396 Whether to allow clients to push and pull using the legacy bundle1
2394 2397 exchange format. (default: True)
2395 2398
2396 2399 ``bundle1gd``
2397 2400 Like ``bundle1`` but only used if the repository is using the
2398 2401 *generaldelta* storage format. (default: True)
2399 2402
2400 2403 ``bundle1.push``
2401 2404 Whether to allow clients to push using the legacy bundle1 exchange
2402 2405 format. (default: True)
2403 2406
2404 2407 ``bundle1gd.push``
2405 2408 Like ``bundle1.push`` but only used if the repository is using the
2406 2409 *generaldelta* storage format. (default: True)
2407 2410
2408 2411 ``bundle1.pull``
2409 2412 Whether to allow clients to pull using the legacy bundle1 exchange
2410 2413 format. (default: True)
2411 2414
2412 2415 ``bundle1gd.pull``
2413 2416 Like ``bundle1.pull`` but only used if the repository is using the
2414 2417 *generaldelta* storage format. (default: True)
2415 2418
2416 2419 Large repositories using the *generaldelta* storage format should
2417 2420 consider setting this option because converting *generaldelta*
2418 2421 repositories to the exchange format required by the bundle1 data
2419 2422 format can consume a lot of CPU.
2420 2423
2421 2424 ``bundle2.stream``
2422 2425 Whether to allow clients to pull using the bundle2 streaming protocol.
2423 2426 (default: True)
2424 2427
2425 2428 ``zliblevel``
2426 2429 Integer between ``-1`` and ``9`` that controls the zlib compression level
2427 2430 for wire protocol commands that send zlib compressed output (notably the
2428 2431 commands that send repository history data).
2429 2432
2430 2433 The default (``-1``) uses the default zlib compression level, which is
2431 2434 likely equivalent to ``6``. ``0`` means no compression. ``9`` means
2432 2435 maximum compression.
2433 2436
2434 2437 Setting this option allows server operators to make trade-offs between
2435 2438 bandwidth and CPU used. Lowering the compression lowers CPU utilization
2436 2439 but sends more bytes to clients.
2437 2440
2438 2441 This option only impacts the HTTP server.
2439 2442
2440 2443 ``zstdlevel``
2441 2444 Integer between ``1`` and ``22`` that controls the zstd compression level
2442 2445 for wire protocol commands. ``1`` is the minimal amount of compression and
2443 2446 ``22`` is the highest amount of compression.
2444 2447
2445 2448 The default (``3``) should be significantly faster than zlib while likely
2446 2449 delivering better compression ratios.
2447 2450
2448 2451 This option only impacts the HTTP server.
2449 2452
2450 2453 See also ``server.zliblevel``.
2451 2454
2452 2455 ``view``
2453 2456 Repository filter used when exchanging revisions with the peer.
2454 2457
2455 2458 The default view (``served``) excludes secret and hidden changesets.
2456 2459 Another useful value is ``immutable`` (no draft, secret or hidden
2457 2460 changesets). (EXPERIMENTAL)
2458 2461
2459 2462 ``smtp``
2460 2463 --------
2461 2464
2462 2465 Configuration for extensions that need to send email messages.
2463 2466
2464 2467 ``host``
2465 2468 Host name of mail server, e.g. "mail.example.com".
2466 2469
2467 2470 ``port``
2468 2471 Optional. Port to connect to on mail server. (default: 465 if
2469 2472 ``tls`` is smtps; 25 otherwise)
2470 2473
2471 2474 ``tls``
2472 2475 Optional. Method to enable TLS when connecting to mail server: starttls,
2473 2476 smtps or none. (default: none)
2474 2477
2475 2478 ``username``
2476 2479 Optional. User name for authenticating with the SMTP server.
2477 2480 (default: None)
2478 2481
2479 2482 ``password``
2480 2483 Optional. Password for authenticating with the SMTP server. If not
2481 2484 specified, interactive sessions will prompt the user for a
2482 2485 password; non-interactive sessions will fail. (default: None)
2483 2486
2484 2487 ``local_hostname``
2485 2488 Optional. The hostname that the sender can use to identify
2486 2489 itself to the MTA.
2487 2490
2488 2491
2489 2492 ``subpaths``
2490 2493 ------------
2491 2494
2492 2495 Subrepository source URLs can go stale if a remote server changes name
2493 2496 or becomes temporarily unavailable. This section lets you define
2494 2497 rewrite rules of the form::
2495 2498
2496 2499 <pattern> = <replacement>
2497 2500
2498 2501 where ``pattern`` is a regular expression matching a subrepository
2499 2502 source URL and ``replacement`` is the replacement string used to
2500 2503 rewrite it. Groups can be matched in ``pattern`` and referenced in
2501 2504 ``replacements``. For instance::
2502 2505
2503 2506 http://server/(.*)-hg/ = http://hg.server/\1/
2504 2507
2505 2508 rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``.
2506 2509
2507 2510 Relative subrepository paths are first made absolute, and the
2508 2511 rewrite rules are then applied on the full (absolute) path. If ``pattern``
2509 2512 doesn't match the full path, an attempt is made to apply it on the
2510 2513 relative path alone. The rules are applied in definition order.
2511 2514
2512 2515 ``subrepos``
2513 2516 ------------
2514 2517
2515 2518 This section contains options that control the behavior of the
2516 2519 subrepositories feature. See also :hg:`help subrepos`.
2517 2520
2518 2521 Security note: auditing in Mercurial is known to be insufficient to
2519 2522 prevent clone-time code execution with carefully constructed Git
2520 2523 subrepos. It is unknown if a similar detect is present in Subversion
2521 2524 subrepos. Both Git and Subversion subrepos are disabled by default
2522 2525 out of security concerns. These subrepo types can be enabled using
2523 2526 the respective options below.
2524 2527
2525 2528 ``allowed``
2526 2529 Whether subrepositories are allowed in the working directory.
2527 2530
2528 2531 When false, commands involving subrepositories (like :hg:`update`)
2529 2532 will fail for all subrepository types.
2530 2533 (default: true)
2531 2534
2532 2535 ``hg:allowed``
2533 2536 Whether Mercurial subrepositories are allowed in the working
2534 2537 directory. This option only has an effect if ``subrepos.allowed``
2535 2538 is true.
2536 2539 (default: true)
2537 2540
2538 2541 ``git:allowed``
2539 2542 Whether Git subrepositories are allowed in the working directory.
2540 2543 This option only has an effect if ``subrepos.allowed`` is true.
2541 2544
2542 2545 See the security note above before enabling Git subrepos.
2543 2546 (default: false)
2544 2547
2545 2548 ``svn:allowed``
2546 2549 Whether Subversion subrepositories are allowed in the working
2547 2550 directory. This option only has an effect if ``subrepos.allowed``
2548 2551 is true.
2549 2552
2550 2553 See the security note above before enabling Subversion subrepos.
2551 2554 (default: false)
2552 2555
2553 2556 ``templatealias``
2554 2557 -----------------
2555 2558
2556 2559 Alias definitions for templates. See :hg:`help templates` for details.
2557 2560
2558 2561 ``templates``
2559 2562 -------------
2560 2563
2561 2564 Use the ``[templates]`` section to define template strings.
2562 2565 See :hg:`help templates` for details.
2563 2566
2564 2567 ``trusted``
2565 2568 -----------
2566 2569
2567 2570 Mercurial will not use the settings in the
2568 2571 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
2569 2572 user or to a trusted group, as various hgrc features allow arbitrary
2570 2573 commands to be run. This issue is often encountered when configuring
2571 2574 hooks or extensions for shared repositories or servers. However,
2572 2575 the web interface will use some safe settings from the ``[web]``
2573 2576 section.
2574 2577
2575 2578 This section specifies what users and groups are trusted. The
2576 2579 current user is always trusted. To trust everybody, list a user or a
2577 2580 group with name ``*``. These settings must be placed in an
2578 2581 *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the
2579 2582 user or service running Mercurial.
2580 2583
2581 2584 ``users``
2582 2585 Comma-separated list of trusted users.
2583 2586
2584 2587 ``groups``
2585 2588 Comma-separated list of trusted groups.
2586 2589
2587 2590
2588 2591 ``ui``
2589 2592 ------
2590 2593
2591 2594 User interface controls.
2592 2595
2593 2596 ``archivemeta``
2594 2597 Whether to include the .hg_archival.txt file containing meta data
2595 2598 (hashes for the repository base and for tip) in archives created
2596 2599 by the :hg:`archive` command or downloaded via hgweb.
2597 2600 (default: True)
2598 2601
2599 2602 ``askusername``
2600 2603 Whether to prompt for a username when committing. If True, and
2601 2604 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
2602 2605 be prompted to enter a username. If no username is entered, the
2603 2606 default ``USER@HOST`` is used instead.
2604 2607 (default: False)
2605 2608
2606 2609 ``clonebundles``
2607 2610 Whether the "clone bundles" feature is enabled.
2608 2611
2609 2612 When enabled, :hg:`clone` may download and apply a server-advertised
2610 2613 bundle file from a URL instead of using the normal exchange mechanism.
2611 2614
2612 2615 This can likely result in faster and more reliable clones.
2613 2616
2614 2617 (default: True)
2615 2618
2616 2619 ``clonebundlefallback``
2617 2620 Whether failure to apply an advertised "clone bundle" from a server
2618 2621 should result in fallback to a regular clone.
2619 2622
2620 2623 This is disabled by default because servers advertising "clone
2621 2624 bundles" often do so to reduce server load. If advertised bundles
2622 2625 start mass failing and clients automatically fall back to a regular
2623 2626 clone, this would add significant and unexpected load to the server
2624 2627 since the server is expecting clone operations to be offloaded to
2625 2628 pre-generated bundles. Failing fast (the default behavior) ensures
2626 2629 clients don't overwhelm the server when "clone bundle" application
2627 2630 fails.
2628 2631
2629 2632 (default: False)
2630 2633
2631 2634 ``clonebundleprefers``
2632 2635 Defines preferences for which "clone bundles" to use.
2633 2636
2634 2637 Servers advertising "clone bundles" may advertise multiple available
2635 2638 bundles. Each bundle may have different attributes, such as the bundle
2636 2639 type and compression format. This option is used to prefer a particular
2637 2640 bundle over another.
2638 2641
2639 2642 The following keys are defined by Mercurial:
2640 2643
2641 2644 BUNDLESPEC
2642 2645 A bundle type specifier. These are strings passed to :hg:`bundle -t`.
2643 2646 e.g. ``gzip-v2`` or ``bzip2-v1``.
2644 2647
2645 2648 COMPRESSION
2646 2649 The compression format of the bundle. e.g. ``gzip`` and ``bzip2``.
2647 2650
2648 2651 Server operators may define custom keys.
2649 2652
2650 2653 Example values: ``COMPRESSION=bzip2``,
2651 2654 ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``.
2652 2655
2653 2656 By default, the first bundle advertised by the server is used.
2654 2657
2655 2658 ``color``
2656 2659 When to colorize output. Possible value are Boolean ("yes" or "no"), or
2657 2660 "debug", or "always". (default: "yes"). "yes" will use color whenever it
2658 2661 seems possible. See :hg:`help color` for details.
2659 2662
2660 2663 ``commitsubrepos``
2661 2664 Whether to commit modified subrepositories when committing the
2662 2665 parent repository. If False and one subrepository has uncommitted
2663 2666 changes, abort the commit.
2664 2667 (default: False)
2665 2668
2666 2669 ``debug``
2667 2670 Print debugging information. (default: False)
2668 2671
2669 2672 ``editor``
2670 2673 The editor to use during a commit. (default: ``$EDITOR`` or ``vi``)
2671 2674
2672 2675 ``fallbackencoding``
2673 2676 Encoding to try if it's not possible to decode the changelog using
2674 2677 UTF-8. (default: ISO-8859-1)
2675 2678
2676 2679 ``graphnodetemplate``
2677 2680 (DEPRECATED) Use ``command-templates.graphnode`` instead.
2678 2681
2679 2682 ``ignore``
2680 2683 A file to read per-user ignore patterns from. This file should be
2681 2684 in the same format as a repository-wide .hgignore file. Filenames
2682 2685 are relative to the repository root. This option supports hook syntax,
2683 2686 so if you want to specify multiple ignore files, you can do so by
2684 2687 setting something like ``ignore.other = ~/.hgignore2``. For details
2685 2688 of the ignore file format, see the ``hgignore(5)`` man page.
2686 2689
2687 2690 ``interactive``
2688 2691 Allow to prompt the user. (default: True)
2689 2692
2690 2693 ``interface``
2691 2694 Select the default interface for interactive features (default: text).
2692 2695 Possible values are 'text' and 'curses'.
2693 2696
2694 2697 ``interface.chunkselector``
2695 2698 Select the interface for change recording (e.g. :hg:`commit -i`).
2696 2699 Possible values are 'text' and 'curses'.
2697 2700 This config overrides the interface specified by ui.interface.
2698 2701
2699 2702 ``large-file-limit``
2700 2703 Largest file size that gives no memory use warning.
2701 2704 Possible values are integers or 0 to disable the check.
2702 2705 Value is expressed in bytes by default, one can use standard units for
2703 2706 convenience (e.g. 10MB, 0.1GB, etc) (default: 10MB)
2704 2707
2705 2708 ``logtemplate``
2706 2709 (DEPRECATED) Use ``command-templates.log`` instead.
2707 2710
2708 2711 ``merge``
2709 2712 The conflict resolution program to use during a manual merge.
2710 2713 For more information on merge tools see :hg:`help merge-tools`.
2711 2714 For configuring merge tools see the ``[merge-tools]`` section.
2712 2715
2713 2716 ``mergemarkers``
2714 2717 Sets the merge conflict marker label styling. The ``detailed`` style
2715 2718 uses the ``command-templates.mergemarker`` setting to style the labels.
2716 2719 The ``basic`` style just uses 'local' and 'other' as the marker label.
2717 2720 One of ``basic`` or ``detailed``.
2718 2721 (default: ``basic``)
2719 2722
2720 2723 ``mergemarkertemplate``
2721 2724 (DEPRECATED) Use ``command-templates.mergemarker`` instead.
2722 2725
2723 2726 ``message-output``
2724 2727 Where to write status and error messages. (default: ``stdio``)
2725 2728
2726 2729 ``channel``
2727 2730 Use separate channel for structured output. (Command-server only)
2728 2731 ``stderr``
2729 2732 Everything to stderr.
2730 2733 ``stdio``
2731 2734 Status to stdout, and error to stderr.
2732 2735
2733 2736 ``origbackuppath``
2734 2737 The path to a directory used to store generated .orig files. If the path is
2735 2738 not a directory, one will be created. If set, files stored in this
2736 2739 directory have the same name as the original file and do not have a .orig
2737 2740 suffix.
2738 2741
2739 2742 ``paginate``
2740 2743 Control the pagination of command output (default: True). See :hg:`help pager`
2741 2744 for details.
2742 2745
2743 2746 ``patch``
2744 2747 An optional external tool that ``hg import`` and some extensions
2745 2748 will use for applying patches. By default Mercurial uses an
2746 2749 internal patch utility. The external tool must work as the common
2747 2750 Unix ``patch`` program. In particular, it must accept a ``-p``
2748 2751 argument to strip patch headers, a ``-d`` argument to specify the
2749 2752 current directory, a file name to patch, and a patch file to take
2750 2753 from stdin.
2751 2754
2752 2755 It is possible to specify a patch tool together with extra
2753 2756 arguments. For example, setting this option to ``patch --merge``
2754 2757 will use the ``patch`` program with its 2-way merge option.
2755 2758
2756 2759 ``portablefilenames``
2757 2760 Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``.
2758 2761 (default: ``warn``)
2759 2762
2760 2763 ``warn``
2761 2764 Print a warning message on POSIX platforms, if a file with a non-portable
2762 2765 filename is added (e.g. a file with a name that can't be created on
2763 2766 Windows because it contains reserved parts like ``AUX``, reserved
2764 2767 characters like ``:``, or would cause a case collision with an existing
2765 2768 file).
2766 2769
2767 2770 ``ignore``
2768 2771 Don't print a warning.
2769 2772
2770 2773 ``abort``
2771 2774 The command is aborted.
2772 2775
2773 2776 ``true``
2774 2777 Alias for ``warn``.
2775 2778
2776 2779 ``false``
2777 2780 Alias for ``ignore``.
2778 2781
2779 2782 .. container:: windows
2780 2783
2781 2784 On Windows, this configuration option is ignored and the command aborted.
2782 2785
2783 2786 ``pre-merge-tool-output-template``
2784 2787 (DEPRECATED) Use ``command-template.pre-merge-tool-output`` instead.
2785 2788
2786 2789 ``quiet``
2787 2790 Reduce the amount of output printed.
2788 2791 (default: False)
2789 2792
2790 2793 ``relative-paths``
2791 2794 Prefer relative paths in the UI.
2792 2795
2793 2796 ``remotecmd``
2794 2797 Remote command to use for clone/push/pull operations.
2795 2798 (default: ``hg``)
2796 2799
2797 2800 ``report_untrusted``
2798 2801 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
2799 2802 trusted user or group.
2800 2803 (default: True)
2801 2804
2802 2805 ``slash``
2803 2806 (Deprecated. Use ``slashpath`` template filter instead.)
2804 2807
2805 2808 Display paths using a slash (``/``) as the path separator. This
2806 2809 only makes a difference on systems where the default path
2807 2810 separator is not the slash character (e.g. Windows uses the
2808 2811 backslash character (``\``)).
2809 2812 (default: False)
2810 2813
2811 2814 ``statuscopies``
2812 2815 Display copies in the status command.
2813 2816
2814 2817 ``ssh``
2815 2818 Command to use for SSH connections. (default: ``ssh``)
2816 2819
2817 2820 ``ssherrorhint``
2818 2821 A hint shown to the user in the case of SSH error (e.g.
2819 2822 ``Please see http://company/internalwiki/ssh.html``)
2820 2823
2821 2824 ``strict``
2822 2825 Require exact command names, instead of allowing unambiguous
2823 2826 abbreviations. (default: False)
2824 2827
2825 2828 ``style``
2826 2829 Name of style to use for command output.
2827 2830
2828 2831 ``supportcontact``
2829 2832 A URL where users should report a Mercurial traceback. Use this if you are a
2830 2833 large organisation with its own Mercurial deployment process and crash
2831 2834 reports should be addressed to your internal support.
2832 2835
2833 2836 ``textwidth``
2834 2837 Maximum width of help text. A longer line generated by ``hg help`` or
2835 2838 ``hg subcommand --help`` will be broken after white space to get this
2836 2839 width or the terminal width, whichever comes first.
2837 2840 A non-positive value will disable this and the terminal width will be
2838 2841 used. (default: 78)
2839 2842
2840 2843 ``timeout``
2841 2844 The timeout used when a lock is held (in seconds), a negative value
2842 2845 means no timeout. (default: 600)
2843 2846
2844 2847 ``timeout.warn``
2845 2848 Time (in seconds) before a warning is printed about held lock. A negative
2846 2849 value means no warning. (default: 0)
2847 2850
2848 2851 ``traceback``
2849 2852 Mercurial always prints a traceback when an unknown exception
2850 2853 occurs. Setting this to True will make Mercurial print a traceback
2851 2854 on all exceptions, even those recognized by Mercurial (such as
2852 2855 IOError or MemoryError). (default: False)
2853 2856
2854 2857 ``tweakdefaults``
2855 2858
2856 2859 By default Mercurial's behavior changes very little from release
2857 2860 to release, but over time the recommended config settings
2858 2861 shift. Enable this config to opt in to get automatic tweaks to
2859 2862 Mercurial's behavior over time. This config setting will have no
2860 2863 effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does
2861 2864 not include ``tweakdefaults``. (default: False)
2862 2865
2863 2866 It currently means::
2864 2867
2865 2868 .. tweakdefaultsmarker
2866 2869
2867 2870 ``username``
2868 2871 The committer of a changeset created when running "commit".
2869 2872 Typically a person's name and email address, e.g. ``Fred Widget
2870 2873 <fred@example.com>``. Environment variables in the
2871 2874 username are expanded.
2872 2875
2873 2876 (default: ``$EMAIL`` or ``username@hostname``. If the username in
2874 2877 hgrc is empty, e.g. if the system admin set ``username =`` in the
2875 2878 system hgrc, it has to be specified manually or in a different
2876 2879 hgrc file)
2877 2880
2878 2881 ``verbose``
2879 2882 Increase the amount of output printed. (default: False)
2880 2883
2881 2884
2882 2885 ``command-templates``
2883 2886 ---------------------
2884 2887
2885 2888 Templates used for customizing the output of commands.
2886 2889
2887 2890 ``graphnode``
2888 2891 The template used to print changeset nodes in an ASCII revision graph.
2889 2892 (default: ``{graphnode}``)
2890 2893
2891 2894 ``log``
2892 2895 Template string for commands that print changesets.
2893 2896
2894 2897 ``mergemarker``
2895 2898 The template used to print the commit description next to each conflict
2896 2899 marker during merge conflicts. See :hg:`help templates` for the template
2897 2900 format.
2898 2901
2899 2902 Defaults to showing the hash, tags, branches, bookmarks, author, and
2900 2903 the first line of the commit description.
2901 2904
2902 2905 If you use non-ASCII characters in names for tags, branches, bookmarks,
2903 2906 authors, and/or commit descriptions, you must pay attention to encodings of
2904 2907 managed files. At template expansion, non-ASCII characters use the encoding
2905 2908 specified by the ``--encoding`` global option, ``HGENCODING`` or other
2906 2909 environment variables that govern your locale. If the encoding of the merge
2907 2910 markers is different from the encoding of the merged files,
2908 2911 serious problems may occur.
2909 2912
2910 2913 Can be overridden per-merge-tool, see the ``[merge-tools]`` section.
2911 2914
2912 2915 ``oneline-summary``
2913 2916 A template used by `hg rebase` and other commands for showing a one-line
2914 2917 summary of a commit. If the template configured here is longer than one
2915 2918 line, then only the first line is used.
2916 2919
2917 2920 The template can be overridden per command by defining a template in
2918 2921 `oneline-summary.<command>`, where `<command>` can be e.g. "rebase".
2919 2922
2920 2923 ``pre-merge-tool-output``
2921 2924 A template that is printed before executing an external merge tool. This can
2922 2925 be used to print out additional context that might be useful to have during
2923 2926 the conflict resolution, such as the description of the various commits
2924 2927 involved or bookmarks/tags.
2925 2928
2926 2929 Additional information is available in the ``local`, ``base``, and ``other``
2927 2930 dicts. For example: ``{local.label}``, ``{base.name}``, or
2928 2931 ``{other.islink}``.
2929 2932
2930 2933
2931 2934 ``web``
2932 2935 -------
2933 2936
2934 2937 Web interface configuration. The settings in this section apply to
2935 2938 both the builtin webserver (started by :hg:`serve`) and the script you
2936 2939 run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI
2937 2940 and WSGI).
2938 2941
2939 2942 The Mercurial webserver does no authentication (it does not prompt for
2940 2943 usernames and passwords to validate *who* users are), but it does do
2941 2944 authorization (it grants or denies access for *authenticated users*
2942 2945 based on settings in this section). You must either configure your
2943 2946 webserver to do authentication for you, or disable the authorization
2944 2947 checks.
2945 2948
2946 2949 For a quick setup in a trusted environment, e.g., a private LAN, where
2947 2950 you want it to accept pushes from anybody, you can use the following
2948 2951 command line::
2949 2952
2950 2953 $ hg --config web.allow-push=* --config web.push_ssl=False serve
2951 2954
2952 2955 Note that this will allow anybody to push anything to the server and
2953 2956 that this should not be used for public servers.
2954 2957
2955 2958 The full set of options is:
2956 2959
2957 2960 ``accesslog``
2958 2961 Where to output the access log. (default: stdout)
2959 2962
2960 2963 ``address``
2961 2964 Interface address to bind to. (default: all)
2962 2965
2963 2966 ``allow-archive``
2964 2967 List of archive format (bz2, gz, zip) allowed for downloading.
2965 2968 (default: empty)
2966 2969
2967 2970 ``allowbz2``
2968 2971 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
2969 2972 revisions.
2970 2973 (default: False)
2971 2974
2972 2975 ``allowgz``
2973 2976 (DEPRECATED) Whether to allow .tar.gz downloading of repository
2974 2977 revisions.
2975 2978 (default: False)
2976 2979
2977 2980 ``allow-pull``
2978 2981 Whether to allow pulling from the repository. (default: True)
2979 2982
2980 2983 ``allow-push``
2981 2984 Whether to allow pushing to the repository. If empty or not set,
2982 2985 pushing is not allowed. If the special value ``*``, any remote
2983 2986 user can push, including unauthenticated users. Otherwise, the
2984 2987 remote user must have been authenticated, and the authenticated
2985 2988 user name must be present in this list. The contents of the
2986 2989 allow-push list are examined after the deny_push list.
2987 2990
2988 2991 ``allow_read``
2989 2992 If the user has not already been denied repository access due to
2990 2993 the contents of deny_read, this list determines whether to grant
2991 2994 repository access to the user. If this list is not empty, and the
2992 2995 user is unauthenticated or not present in the list, then access is
2993 2996 denied for the user. If the list is empty or not set, then access
2994 2997 is permitted to all users by default. Setting allow_read to the
2995 2998 special value ``*`` is equivalent to it not being set (i.e. access
2996 2999 is permitted to all users). The contents of the allow_read list are
2997 3000 examined after the deny_read list.
2998 3001
2999 3002 ``allowzip``
3000 3003 (DEPRECATED) Whether to allow .zip downloading of repository
3001 3004 revisions. This feature creates temporary files.
3002 3005 (default: False)
3003 3006
3004 3007 ``archivesubrepos``
3005 3008 Whether to recurse into subrepositories when archiving.
3006 3009 (default: False)
3007 3010
3008 3011 ``baseurl``
3009 3012 Base URL to use when publishing URLs in other locations, so
3010 3013 third-party tools like email notification hooks can construct
3011 3014 URLs. Example: ``http://hgserver/repos/``.
3012 3015
3013 3016 ``cacerts``
3014 3017 Path to file containing a list of PEM encoded certificate
3015 3018 authority certificates. Environment variables and ``~user``
3016 3019 constructs are expanded in the filename. If specified on the
3017 3020 client, then it will verify the identity of remote HTTPS servers
3018 3021 with these certificates.
3019 3022
3020 3023 To disable SSL verification temporarily, specify ``--insecure`` from
3021 3024 command line.
3022 3025
3023 3026 You can use OpenSSL's CA certificate file if your platform has
3024 3027 one. On most Linux systems this will be
3025 3028 ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to
3026 3029 generate this file manually. The form must be as follows::
3027 3030
3028 3031 -----BEGIN CERTIFICATE-----
3029 3032 ... (certificate in base64 PEM encoding) ...
3030 3033 -----END CERTIFICATE-----
3031 3034 -----BEGIN CERTIFICATE-----
3032 3035 ... (certificate in base64 PEM encoding) ...
3033 3036 -----END CERTIFICATE-----
3034 3037
3035 3038 ``cache``
3036 3039 Whether to support caching in hgweb. (default: True)
3037 3040
3038 3041 ``certificate``
3039 3042 Certificate to use when running :hg:`serve`.
3040 3043
3041 3044 ``collapse``
3042 3045 With ``descend`` enabled, repositories in subdirectories are shown at
3043 3046 a single level alongside repositories in the current path. With
3044 3047 ``collapse`` also enabled, repositories residing at a deeper level than
3045 3048 the current path are grouped behind navigable directory entries that
3046 3049 lead to the locations of these repositories. In effect, this setting
3047 3050 collapses each collection of repositories found within a subdirectory
3048 3051 into a single entry for that subdirectory. (default: False)
3049 3052
3050 3053 ``comparisoncontext``
3051 3054 Number of lines of context to show in side-by-side file comparison. If
3052 3055 negative or the value ``full``, whole files are shown. (default: 5)
3053 3056
3054 3057 This setting can be overridden by a ``context`` request parameter to the
3055 3058 ``comparison`` command, taking the same values.
3056 3059
3057 3060 ``contact``
3058 3061 Name or email address of the person in charge of the repository.
3059 3062 (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty)
3060 3063
3061 3064 ``csp``
3062 3065 Send a ``Content-Security-Policy`` HTTP header with this value.
3063 3066
3064 3067 The value may contain a special string ``%nonce%``, which will be replaced
3065 3068 by a randomly-generated one-time use value. If the value contains
3066 3069 ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the
3067 3070 one-time property of the nonce. This nonce will also be inserted into
3068 3071 ``<script>`` elements containing inline JavaScript.
3069 3072
3070 3073 Note: lots of HTML content sent by the server is derived from repository
3071 3074 data. Please consider the potential for malicious repository data to
3072 3075 "inject" itself into generated HTML content as part of your security
3073 3076 threat model.
3074 3077
3075 3078 ``deny_push``
3076 3079 Whether to deny pushing to the repository. If empty or not set,
3077 3080 push is not denied. If the special value ``*``, all remote users are
3078 3081 denied push. Otherwise, unauthenticated users are all denied, and
3079 3082 any authenticated user name present in this list is also denied. The
3080 3083 contents of the deny_push list are examined before the allow-push list.
3081 3084
3082 3085 ``deny_read``
3083 3086 Whether to deny reading/viewing of the repository. If this list is
3084 3087 not empty, unauthenticated users are all denied, and any
3085 3088 authenticated user name present in this list is also denied access to
3086 3089 the repository. If set to the special value ``*``, all remote users
3087 3090 are denied access (rarely needed ;). If deny_read is empty or not set,
3088 3091 the determination of repository access depends on the presence and
3089 3092 content of the allow_read list (see description). If both
3090 3093 deny_read and allow_read are empty or not set, then access is
3091 3094 permitted to all users by default. If the repository is being
3092 3095 served via hgwebdir, denied users will not be able to see it in
3093 3096 the list of repositories. The contents of the deny_read list have
3094 3097 priority over (are examined before) the contents of the allow_read
3095 3098 list.
3096 3099
3097 3100 ``descend``
3098 3101 hgwebdir indexes will not descend into subdirectories. Only repositories
3099 3102 directly in the current path will be shown (other repositories are still
3100 3103 available from the index corresponding to their containing path).
3101 3104
3102 3105 ``description``
3103 3106 Textual description of the repository's purpose or contents.
3104 3107 (default: "unknown")
3105 3108
3106 3109 ``encoding``
3107 3110 Character encoding name. (default: the current locale charset)
3108 3111 Example: "UTF-8".
3109 3112
3110 3113 ``errorlog``
3111 3114 Where to output the error log. (default: stderr)
3112 3115
3113 3116 ``guessmime``
3114 3117 Control MIME types for raw download of file content.
3115 3118 Set to True to let hgweb guess the content type from the file
3116 3119 extension. This will serve HTML files as ``text/html`` and might
3117 3120 allow cross-site scripting attacks when serving untrusted
3118 3121 repositories. (default: False)
3119 3122
3120 3123 ``hidden``
3121 3124 Whether to hide the repository in the hgwebdir index.
3122 3125 (default: False)
3123 3126
3124 3127 ``ipv6``
3125 3128 Whether to use IPv6. (default: False)
3126 3129
3127 3130 ``labels``
3128 3131 List of string *labels* associated with the repository.
3129 3132
3130 3133 Labels are exposed as a template keyword and can be used to customize
3131 3134 output. e.g. the ``index`` template can group or filter repositories
3132 3135 by labels and the ``summary`` template can display additional content
3133 3136 if a specific label is present.
3134 3137
3135 3138 ``logoimg``
3136 3139 File name of the logo image that some templates display on each page.
3137 3140 The file name is relative to ``staticurl``. That is, the full path to
3138 3141 the logo image is "staticurl/logoimg".
3139 3142 If unset, ``hglogo.png`` will be used.
3140 3143
3141 3144 ``logourl``
3142 3145 Base URL to use for logos. If unset, ``https://mercurial-scm.org/``
3143 3146 will be used.
3144 3147
3145 3148 ``maxchanges``
3146 3149 Maximum number of changes to list on the changelog. (default: 10)
3147 3150
3148 3151 ``maxfiles``
3149 3152 Maximum number of files to list per changeset. (default: 10)
3150 3153
3151 3154 ``maxshortchanges``
3152 3155 Maximum number of changes to list on the shortlog, graph or filelog
3153 3156 pages. (default: 60)
3154 3157
3155 3158 ``name``
3156 3159 Repository name to use in the web interface.
3157 3160 (default: current working directory)
3158 3161
3159 3162 ``port``
3160 3163 Port to listen on. (default: 8000)
3161 3164
3162 3165 ``prefix``
3163 3166 Prefix path to serve from. (default: '' (server root))
3164 3167
3165 3168 ``push_ssl``
3166 3169 Whether to require that inbound pushes be transported over SSL to
3167 3170 prevent password sniffing. (default: True)
3168 3171
3169 3172 ``refreshinterval``
3170 3173 How frequently directory listings re-scan the filesystem for new
3171 3174 repositories, in seconds. This is relevant when wildcards are used
3172 3175 to define paths. Depending on how much filesystem traversal is
3173 3176 required, refreshing may negatively impact performance.
3174 3177
3175 3178 Values less than or equal to 0 always refresh.
3176 3179 (default: 20)
3177 3180
3178 3181 ``server-header``
3179 3182 Value for HTTP ``Server`` response header.
3180 3183
3181 3184 ``static``
3182 3185 Directory where static files are served from.
3183 3186
3184 3187 ``staticurl``
3185 3188 Base URL to use for static files. If unset, static files (e.g. the
3186 3189 hgicon.png favicon) will be served by the CGI script itself. Use
3187 3190 this setting to serve them directly with the HTTP server.
3188 3191 Example: ``http://hgserver/static/``.
3189 3192
3190 3193 ``stripes``
3191 3194 How many lines a "zebra stripe" should span in multi-line output.
3192 3195 Set to 0 to disable. (default: 1)
3193 3196
3194 3197 ``style``
3195 3198 Which template map style to use. The available options are the names of
3196 3199 subdirectories in the HTML templates path. (default: ``paper``)
3197 3200 Example: ``monoblue``.
3198 3201
3199 3202 ``templates``
3200 3203 Where to find the HTML templates. The default path to the HTML templates
3201 3204 can be obtained from ``hg debuginstall``.
3202 3205
3203 3206 ``websub``
3204 3207 ----------
3205 3208
3206 3209 Web substitution filter definition. You can use this section to
3207 3210 define a set of regular expression substitution patterns which
3208 3211 let you automatically modify the hgweb server output.
3209 3212
3210 3213 The default hgweb templates only apply these substitution patterns
3211 3214 on the revision description fields. You can apply them anywhere
3212 3215 you want when you create your own templates by adding calls to the
3213 3216 "websub" filter (usually after calling the "escape" filter).
3214 3217
3215 3218 This can be used, for example, to convert issue references to links
3216 3219 to your issue tracker, or to convert "markdown-like" syntax into
3217 3220 HTML (see the examples below).
3218 3221
3219 3222 Each entry in this section names a substitution filter.
3220 3223 The value of each entry defines the substitution expression itself.
3221 3224 The websub expressions follow the old interhg extension syntax,
3222 3225 which in turn imitates the Unix sed replacement syntax::
3223 3226
3224 3227 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
3225 3228
3226 3229 You can use any separator other than "/". The final "i" is optional
3227 3230 and indicates that the search must be case insensitive.
3228 3231
3229 3232 Examples::
3230 3233
3231 3234 [websub]
3232 3235 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
3233 3236 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
3234 3237 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
3235 3238
3236 3239 ``worker``
3237 3240 ----------
3238 3241
3239 3242 Parallel master/worker configuration. We currently perform working
3240 3243 directory updates in parallel on Unix-like systems, which greatly
3241 3244 helps performance.
3242 3245
3243 3246 ``enabled``
3244 3247 Whether to enable workers code to be used.
3245 3248 (default: true)
3246 3249
3247 3250 ``numcpus``
3248 3251 Number of CPUs to use for parallel operations. A zero or
3249 3252 negative value is treated as ``use the default``.
3250 3253 (default: 4 or the number of CPUs on the system, whichever is larger)
3251 3254
3252 3255 ``backgroundclose``
3253 3256 Whether to enable closing file handles on background threads during certain
3254 3257 operations. Some platforms aren't very efficient at closing file
3255 3258 handles that have been written or appended to. By performing file closing
3256 3259 on background threads, file write rate can increase substantially.
3257 3260 (default: true on Windows, false elsewhere)
3258 3261
3259 3262 ``backgroundcloseminfilecount``
3260 3263 Minimum number of files required to trigger background file closing.
3261 3264 Operations not writing this many files won't start background close
3262 3265 threads.
3263 3266 (default: 2048)
3264 3267
3265 3268 ``backgroundclosemaxqueue``
3266 3269 The maximum number of opened file handles waiting to be closed in the
3267 3270 background. This option only has an effect if ``backgroundclose`` is
3268 3271 enabled.
3269 3272 (default: 384)
3270 3273
3271 3274 ``backgroundclosethreadcount``
3272 3275 Number of threads to process background file closes. Only relevant if
3273 3276 ``backgroundclose`` is enabled.
3274 3277 (default: 4)
@@ -1,246 +1,250 b''
1 1 # upgrade.py - functions for automatic upgrade of Mercurial repository
2 2 #
3 3 # Copyright (c) 2022-present, Pierre-Yves David
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 from ..i18n import _
8 8
9 9 from .. import (
10 10 error,
11 11 requirements as requirementsmod,
12 12 scmutil,
13 13 )
14 14
15 15 from . import (
16 16 actions,
17 17 engine,
18 18 )
19 19
20 20
21 21 class AutoUpgradeOperation(actions.BaseOperation):
22 22 """A limited Upgrade Operation used to run simple auto upgrade task
23 23
24 24 (Expand it as needed in the future)
25 25 """
26 26
27 27 def __init__(self, req):
28 28 super().__init__(
29 29 new_requirements=req,
30 30 backup_store=False,
31 31 )
32 32
33 33
34 34 def get_share_safe_action(repo):
35 35 """return an automatic-upgrade action for `share-safe` if applicable
36 36
37 37 If no action is needed, return None, otherwise return a callback to upgrade
38 38 or downgrade the repository according the configuration and repository
39 39 format.
40 40 """
41 41 ui = repo.ui
42 42 requirements = repo.requirements
43 43 auto_upgrade_share_source = ui.configbool(
44 44 b'format',
45 45 b'use-share-safe.automatic-upgrade-of-mismatching-repositories',
46 46 )
47 47 auto_upgrade_quiet = ui.configbool(
48 48 b'format',
49 49 b'use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet',
50 50 )
51 51
52 52 action = None
53 53
54 54 if (
55 55 auto_upgrade_share_source
56 56 and requirementsmod.SHARED_REQUIREMENT not in requirements
57 57 ):
58 58 sf_config = ui.configbool(b'format', b'use-share-safe')
59 59 sf_local = requirementsmod.SHARESAFE_REQUIREMENT in requirements
60 60 if sf_config and not sf_local:
61 61 msg = _(
62 62 b"automatically upgrading repository to the `share-safe`"
63 63 b" feature\n"
64 64 )
65 65 hint = b"(see `hg help config.format.use-share-safe` for details)\n"
66 66
67 67 def action():
68 68 if not (ui.quiet or auto_upgrade_quiet):
69 69 ui.write_err(msg)
70 70 ui.write_err(hint)
71 71 requirements.add(requirementsmod.SHARESAFE_REQUIREMENT)
72 72 scmutil.writereporequirements(repo, requirements)
73 73
74 74 elif sf_local and not sf_config:
75 75 msg = _(
76 76 b"automatically downgrading repository from the `share-safe`"
77 77 b" feature\n"
78 78 )
79 79 hint = b"(see `hg help config.format.use-share-safe` for details)\n"
80 80
81 81 def action():
82 82 if not (ui.quiet or auto_upgrade_quiet):
83 83 ui.write_err(msg)
84 84 ui.write_err(hint)
85 85 requirements.discard(requirementsmod.SHARESAFE_REQUIREMENT)
86 86 scmutil.writereporequirements(repo, requirements)
87 87
88 88 return action
89 89
90 90
91 91 def get_tracked_hint_action(repo):
92 92 """return an automatic-upgrade action for `tracked-hint` if applicable
93 93
94 94 If no action is needed, return None, otherwise return a callback to upgrade
95 95 or downgrade the repository according the configuration and repository
96 96 format.
97 97 """
98 98 ui = repo.ui
99 99 requirements = set(repo.requirements)
100 100 auto_upgrade_tracked_hint = ui.configbool(
101 101 b'format',
102 102 b'use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories',
103 103 )
104 104
105 105 action = None
106 106
107 107 if auto_upgrade_tracked_hint:
108 108 th_config = ui.configbool(b'format', b'use-dirstate-tracked-hint')
109 109 th_local = requirementsmod.DIRSTATE_TRACKED_HINT_V1 in requirements
110 110 if th_config and not th_local:
111 111 msg = _(
112 112 b"automatically upgrading repository to the `tracked-hint`"
113 113 b" feature\n"
114 114 )
115 115 hint = b"(see `hg help config.format.use-dirstate-tracked-hint` for details)\n"
116 116
117 117 def action():
118 118 if not ui.quiet:
119 119 ui.write_err(msg)
120 120 ui.write_err(hint)
121 121 requirements.add(requirementsmod.DIRSTATE_TRACKED_HINT_V1)
122 122 op = AutoUpgradeOperation(requirements)
123 123 engine.upgrade_tracked_hint(ui, repo, op, add=True)
124 124
125 125 elif th_local and not th_config:
126 126 msg = _(
127 127 b"automatically downgrading repository from the `tracked-hint`"
128 128 b" feature\n"
129 129 )
130 130 hint = b"(see `hg help config.format.use-dirstate-tracked-hint` for details)\n"
131 131
132 132 def action():
133 133 if not ui.quiet:
134 134 ui.write_err(msg)
135 135 ui.write_err(hint)
136 136 requirements.discard(requirementsmod.DIRSTATE_TRACKED_HINT_V1)
137 137 op = AutoUpgradeOperation(requirements)
138 138 engine.upgrade_tracked_hint(ui, repo, op, add=False)
139 139
140 140 return action
141 141
142 142
143 143 def get_dirstate_v2_action(repo):
144 144 """return an automatic-upgrade action for `dirstate-v2` if applicable
145 145
146 146 If no action is needed, return None, otherwise return a callback to upgrade
147 147 or downgrade the repository according the configuration and repository
148 148 format.
149 149 """
150 150 ui = repo.ui
151 151 requirements = set(repo.requirements)
152 152 auto_upgrade_dv2 = ui.configbool(
153 153 b'format',
154 154 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories',
155 155 )
156 auto_upgrade_dv2_quiet = ui.configbool(
157 b'format',
158 b'use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet',
159 )
156 160
157 161 action = None
158 162
159 163 if auto_upgrade_dv2:
160 164 d2_config = ui.configbool(b'format', b'use-dirstate-v2')
161 165 d2_local = requirementsmod.DIRSTATE_V2_REQUIREMENT in requirements
162 166 if d2_config and not d2_local:
163 167 msg = _(
164 168 b"automatically upgrading repository to the `dirstate-v2`"
165 169 b" feature\n"
166 170 )
167 171 hint = (
168 172 b"(see `hg help config.format.use-dirstate-v2` for details)\n"
169 173 )
170 174
171 175 def action():
172 if not ui.quiet:
176 if not (ui.quiet or auto_upgrade_dv2_quiet):
173 177 ui.write_err(msg)
174 178 ui.write_err(hint)
175 179 requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT)
176 180 fake_op = AutoUpgradeOperation(requirements)
177 181 engine.upgrade_dirstate(repo.ui, repo, fake_op, b'v1', b'v2')
178 182
179 183 elif d2_local and not d2_config:
180 184 msg = _(
181 185 b"automatically downgrading repository from the `dirstate-v2`"
182 186 b" feature\n"
183 187 )
184 188 hint = (
185 189 b"(see `hg help config.format.use-dirstate-v2` for details)\n"
186 190 )
187 191
188 192 def action():
189 if not ui.quiet:
193 if not (ui.quiet or auto_upgrade_dv2_quiet):
190 194 ui.write_err(msg)
191 195 ui.write_err(hint)
192 196 requirements.discard(requirementsmod.DIRSTATE_V2_REQUIREMENT)
193 197 fake_op = AutoUpgradeOperation(requirements)
194 198 engine.upgrade_dirstate(repo.ui, repo, fake_op, b'v2', b'v1')
195 199
196 200 return action
197 201
198 202
199 203 AUTO_UPGRADE_ACTIONS = [
200 204 get_dirstate_v2_action,
201 205 get_share_safe_action,
202 206 get_tracked_hint_action,
203 207 ]
204 208
205 209
206 210 def may_auto_upgrade(repo, maker_func):
207 211 """potentially perform auto-upgrade and return the final repository to use
208 212
209 213 Auto-upgrade are "quick" repository upgrade that might automatically be run
210 214 by "any" repository access. See `hg help config.format` for automatic
211 215 upgrade documentation.
212 216
213 217 note: each relevant upgrades are done one after the other for simplicity.
214 218 This avoid having repository is partially inconsistent state while
215 219 upgrading.
216 220
217 221 repo: the current repository instance
218 222 maker_func: a factory function that can recreate a repository after an upgrade
219 223 """
220 224 clear = False
221 225
222 226 loop = 0
223 227
224 228 try:
225 229 while not clear:
226 230 loop += 1
227 231 if loop > 100:
228 232 # XXX basic protection against infinite loop, make it better.
229 233 raise error.ProgrammingError("Too many auto upgrade loops")
230 234 clear = True
231 235 for get_action in AUTO_UPGRADE_ACTIONS:
232 236 action = get_action(repo)
233 237 if action is not None:
234 238 clear = False
235 239 with repo.wlock(wait=False), repo.lock(wait=False):
236 240 action = get_action(repo)
237 241 if action is not None:
238 242 action()
239 243 repo = maker_func()
240 244 except error.LockError:
241 245 # if we cannot get the lock, ignore the auto-upgrade attemps and
242 246 # proceed. We might want to make this behavior configurable in the
243 247 # future.
244 248 pass
245 249
246 250 return repo
@@ -1,4068 +1,4070 b''
1 1 Short help:
2 2
3 3 $ hg
4 4 Mercurial Distributed SCM
5 5
6 6 basic commands:
7 7
8 8 add add the specified files on the next commit
9 9 annotate show changeset information by line for each file
10 10 clone make a copy of an existing repository
11 11 commit commit the specified files or all outstanding changes
12 12 diff diff repository (or selected files)
13 13 export dump the header and diffs for one or more changesets
14 14 forget forget the specified files on the next commit
15 15 init create a new repository in the given directory
16 16 log show revision history of entire repository or files
17 17 merge merge another revision into working directory
18 18 pull pull changes from the specified source
19 19 push push changes to the specified destination
20 20 remove remove the specified files on the next commit
21 21 serve start stand-alone webserver
22 22 status show changed files in the working directory
23 23 summary summarize working directory state
24 24 update update working directory (or switch revisions)
25 25
26 26 (use 'hg help' for the full list of commands or 'hg -v' for details)
27 27
28 28 $ hg -q
29 29 add add the specified files on the next commit
30 30 annotate show changeset information by line for each file
31 31 clone make a copy of an existing repository
32 32 commit commit the specified files or all outstanding changes
33 33 diff diff repository (or selected files)
34 34 export dump the header and diffs for one or more changesets
35 35 forget forget the specified files on the next commit
36 36 init create a new repository in the given directory
37 37 log show revision history of entire repository or files
38 38 merge merge another revision into working directory
39 39 pull pull changes from the specified source
40 40 push push changes to the specified destination
41 41 remove remove the specified files on the next commit
42 42 serve start stand-alone webserver
43 43 status show changed files in the working directory
44 44 summary summarize working directory state
45 45 update update working directory (or switch revisions)
46 46
47 47 Extra extensions will be printed in help output in a non-reliable order since
48 48 the extension is unknown.
49 49 #if no-extraextensions
50 50
51 51 $ hg help
52 52 Mercurial Distributed SCM
53 53
54 54 list of commands:
55 55
56 56 Repository creation:
57 57
58 58 clone make a copy of an existing repository
59 59 init create a new repository in the given directory
60 60
61 61 Remote repository management:
62 62
63 63 incoming show new changesets found in source
64 64 outgoing show changesets not found in the destination
65 65 paths show aliases for remote repositories
66 66 pull pull changes from the specified source
67 67 push push changes to the specified destination
68 68 serve start stand-alone webserver
69 69
70 70 Change creation:
71 71
72 72 commit commit the specified files or all outstanding changes
73 73
74 74 Change manipulation:
75 75
76 76 backout reverse effect of earlier changeset
77 77 graft copy changes from other branches onto the current branch
78 78 merge merge another revision into working directory
79 79
80 80 Change organization:
81 81
82 82 bookmarks create a new bookmark or list existing bookmarks
83 83 branch set or show the current branch name
84 84 branches list repository named branches
85 85 phase set or show the current phase name
86 86 tag add one or more tags for the current or given revision
87 87 tags list repository tags
88 88
89 89 File content management:
90 90
91 91 annotate show changeset information by line for each file
92 92 cat output the current or given revision of files
93 93 copy mark files as copied for the next commit
94 94 diff diff repository (or selected files)
95 95 grep search for a pattern in specified files
96 96
97 97 Change navigation:
98 98
99 99 bisect subdivision search of changesets
100 100 heads show branch heads
101 101 identify identify the working directory or specified revision
102 102 log show revision history of entire repository or files
103 103
104 104 Working directory management:
105 105
106 106 add add the specified files on the next commit
107 107 addremove add all new files, delete all missing files
108 108 files list tracked files
109 109 forget forget the specified files on the next commit
110 110 purge removes files not tracked by Mercurial
111 111 remove remove the specified files on the next commit
112 112 rename rename files; equivalent of copy + remove
113 113 resolve redo merges or set/view the merge status of files
114 114 revert restore files to their checkout state
115 115 root print the root (top) of the current working directory
116 116 shelve save and set aside changes from the working directory
117 117 status show changed files in the working directory
118 118 summary summarize working directory state
119 119 unshelve restore a shelved change to the working directory
120 120 update update working directory (or switch revisions)
121 121
122 122 Change import/export:
123 123
124 124 archive create an unversioned archive of a repository revision
125 125 bundle create a bundle file
126 126 export dump the header and diffs for one or more changesets
127 127 import import an ordered set of patches
128 128 unbundle apply one or more bundle files
129 129
130 130 Repository maintenance:
131 131
132 132 manifest output the current or given revision of the project manifest
133 133 recover roll back an interrupted transaction
134 134 verify verify the integrity of the repository
135 135
136 136 Help:
137 137
138 138 config show combined config settings from all hgrc files
139 139 help show help for a given topic or a help overview
140 140 version output version and copyright information
141 141
142 142 additional help topics:
143 143
144 144 Mercurial identifiers:
145 145
146 146 filesets Specifying File Sets
147 147 hgignore Syntax for Mercurial Ignore Files
148 148 patterns File Name Patterns
149 149 revisions Specifying Revisions
150 150 urls URL Paths
151 151
152 152 Mercurial output:
153 153
154 154 color Colorizing Outputs
155 155 dates Date Formats
156 156 diffs Diff Formats
157 157 templating Template Usage
158 158
159 159 Mercurial configuration:
160 160
161 161 config Configuration Files
162 162 environment Environment Variables
163 163 extensions Using Additional Features
164 164 flags Command-line flags
165 165 hgweb Configuring hgweb
166 166 merge-tools Merge Tools
167 167 pager Pager Support
168 168 rust Rust in Mercurial
169 169
170 170 Concepts:
171 171
172 172 bundlespec Bundle File Formats
173 173 evolution Safely rewriting history (EXPERIMENTAL)
174 174 glossary Glossary
175 175 phases Working with Phases
176 176 subrepos Subrepositories
177 177
178 178 Miscellaneous:
179 179
180 180 deprecated Deprecated Features
181 181 internals Technical implementation topics
182 182 scripting Using Mercurial from scripts and automation
183 183
184 184 (use 'hg help -v' to show built-in aliases and global options)
185 185
186 186 $ hg -q help
187 187 Repository creation:
188 188
189 189 clone make a copy of an existing repository
190 190 init create a new repository in the given directory
191 191
192 192 Remote repository management:
193 193
194 194 incoming show new changesets found in source
195 195 outgoing show changesets not found in the destination
196 196 paths show aliases for remote repositories
197 197 pull pull changes from the specified source
198 198 push push changes to the specified destination
199 199 serve start stand-alone webserver
200 200
201 201 Change creation:
202 202
203 203 commit commit the specified files or all outstanding changes
204 204
205 205 Change manipulation:
206 206
207 207 backout reverse effect of earlier changeset
208 208 graft copy changes from other branches onto the current branch
209 209 merge merge another revision into working directory
210 210
211 211 Change organization:
212 212
213 213 bookmarks create a new bookmark or list existing bookmarks
214 214 branch set or show the current branch name
215 215 branches list repository named branches
216 216 phase set or show the current phase name
217 217 tag add one or more tags for the current or given revision
218 218 tags list repository tags
219 219
220 220 File content management:
221 221
222 222 annotate show changeset information by line for each file
223 223 cat output the current or given revision of files
224 224 copy mark files as copied for the next commit
225 225 diff diff repository (or selected files)
226 226 grep search for a pattern in specified files
227 227
228 228 Change navigation:
229 229
230 230 bisect subdivision search of changesets
231 231 heads show branch heads
232 232 identify identify the working directory or specified revision
233 233 log show revision history of entire repository or files
234 234
235 235 Working directory management:
236 236
237 237 add add the specified files on the next commit
238 238 addremove add all new files, delete all missing files
239 239 files list tracked files
240 240 forget forget the specified files on the next commit
241 241 purge removes files not tracked by Mercurial
242 242 remove remove the specified files on the next commit
243 243 rename rename files; equivalent of copy + remove
244 244 resolve redo merges or set/view the merge status of files
245 245 revert restore files to their checkout state
246 246 root print the root (top) of the current working directory
247 247 shelve save and set aside changes from the working directory
248 248 status show changed files in the working directory
249 249 summary summarize working directory state
250 250 unshelve restore a shelved change to the working directory
251 251 update update working directory (or switch revisions)
252 252
253 253 Change import/export:
254 254
255 255 archive create an unversioned archive of a repository revision
256 256 bundle create a bundle file
257 257 export dump the header and diffs for one or more changesets
258 258 import import an ordered set of patches
259 259 unbundle apply one or more bundle files
260 260
261 261 Repository maintenance:
262 262
263 263 manifest output the current or given revision of the project manifest
264 264 recover roll back an interrupted transaction
265 265 verify verify the integrity of the repository
266 266
267 267 Help:
268 268
269 269 config show combined config settings from all hgrc files
270 270 help show help for a given topic or a help overview
271 271 version output version and copyright information
272 272
273 273 additional help topics:
274 274
275 275 Mercurial identifiers:
276 276
277 277 filesets Specifying File Sets
278 278 hgignore Syntax for Mercurial Ignore Files
279 279 patterns File Name Patterns
280 280 revisions Specifying Revisions
281 281 urls URL Paths
282 282
283 283 Mercurial output:
284 284
285 285 color Colorizing Outputs
286 286 dates Date Formats
287 287 diffs Diff Formats
288 288 templating Template Usage
289 289
290 290 Mercurial configuration:
291 291
292 292 config Configuration Files
293 293 environment Environment Variables
294 294 extensions Using Additional Features
295 295 flags Command-line flags
296 296 hgweb Configuring hgweb
297 297 merge-tools Merge Tools
298 298 pager Pager Support
299 299 rust Rust in Mercurial
300 300
301 301 Concepts:
302 302
303 303 bundlespec Bundle File Formats
304 304 evolution Safely rewriting history (EXPERIMENTAL)
305 305 glossary Glossary
306 306 phases Working with Phases
307 307 subrepos Subrepositories
308 308
309 309 Miscellaneous:
310 310
311 311 deprecated Deprecated Features
312 312 internals Technical implementation topics
313 313 scripting Using Mercurial from scripts and automation
314 314
315 315 Test extension help:
316 316 $ hg help extensions --config extensions.rebase= --config extensions.children=
317 317 Using Additional Features
318 318 """""""""""""""""""""""""
319 319
320 320 Mercurial has the ability to add new features through the use of
321 321 extensions. Extensions may add new commands, add options to existing
322 322 commands, change the default behavior of commands, or implement hooks.
323 323
324 324 To enable the "foo" extension, either shipped with Mercurial or in the
325 325 Python search path, create an entry for it in your configuration file,
326 326 like this:
327 327
328 328 [extensions]
329 329 foo =
330 330
331 331 You may also specify the full path to an extension:
332 332
333 333 [extensions]
334 334 myfeature = ~/.hgext/myfeature.py
335 335
336 336 See 'hg help config' for more information on configuration files.
337 337
338 338 Extensions are not loaded by default for a variety of reasons: they can
339 339 increase startup overhead; they may be meant for advanced usage only; they
340 340 may provide potentially dangerous abilities (such as letting you destroy
341 341 or modify history); they might not be ready for prime time; or they may
342 342 alter some usual behaviors of stock Mercurial. It is thus up to the user
343 343 to activate extensions as needed.
344 344
345 345 To explicitly disable an extension enabled in a configuration file of
346 346 broader scope, prepend its path with !:
347 347
348 348 [extensions]
349 349 # disabling extension bar residing in /path/to/extension/bar.py
350 350 bar = !/path/to/extension/bar.py
351 351 # ditto, but no path was supplied for extension baz
352 352 baz = !
353 353
354 354 enabled extensions:
355 355
356 356 children command to display child changesets (DEPRECATED)
357 357 rebase command to move sets of revisions to a different ancestor
358 358
359 359 disabled extensions:
360 360
361 361 acl hooks for controlling repository access
362 362 blackbox log repository events to a blackbox for debugging
363 363 bugzilla hooks for integrating with the Bugzilla bug tracker
364 364 censor erase file content at a given revision
365 365 churn command to display statistics about repository history
366 366 clonebundles advertise pre-generated bundles to seed clones
367 367 closehead close arbitrary heads without checking them out first
368 368 convert import revisions from foreign VCS repositories into
369 369 Mercurial
370 370 eol automatically manage newlines in repository files
371 371 extdiff command to allow external programs to compare revisions
372 372 factotum http authentication with factotum
373 373 fastexport export repositories as git fast-import stream
374 374 githelp try mapping git commands to Mercurial commands
375 375 gpg commands to sign and verify changesets
376 376 hgk browse the repository in a graphical way
377 377 highlight syntax highlighting for hgweb (requires Pygments)
378 378 histedit interactive history editing
379 379 keyword expand keywords in tracked files
380 380 largefiles track large binary files
381 381 mq manage a stack of patches
382 382 notify hooks for sending email push notifications
383 383 patchbomb command to send changesets as (a series of) patch emails
384 384 relink recreates hardlinks between repository clones
385 385 schemes extend schemes with shortcuts to repository swarms
386 386 share share a common history between several working directories
387 387 transplant command to transplant changesets from another branch
388 388 win32mbcs allow the use of MBCS paths with problematic encodings
389 389 zeroconf discover and advertise repositories on the local network
390 390
391 391 #endif
392 392
393 393 Verify that deprecated extensions are included if --verbose:
394 394
395 395 $ hg -v help extensions | grep children
396 396 children command to display child changesets (DEPRECATED)
397 397
398 398 Verify that extension keywords appear in help templates
399 399
400 400 $ hg help --config extensions.transplant= templating|grep transplant > /dev/null
401 401
402 402 Test short command list with verbose option
403 403
404 404 $ hg -v help shortlist
405 405 Mercurial Distributed SCM
406 406
407 407 basic commands:
408 408
409 409 abort abort an unfinished operation (EXPERIMENTAL)
410 410 add add the specified files on the next commit
411 411 annotate, blame
412 412 show changeset information by line for each file
413 413 clone make a copy of an existing repository
414 414 commit, ci commit the specified files or all outstanding changes
415 415 continue resumes an interrupted operation (EXPERIMENTAL)
416 416 diff diff repository (or selected files)
417 417 export dump the header and diffs for one or more changesets
418 418 forget forget the specified files on the next commit
419 419 init create a new repository in the given directory
420 420 log, history show revision history of entire repository or files
421 421 merge merge another revision into working directory
422 422 pull pull changes from the specified source
423 423 push push changes to the specified destination
424 424 remove, rm remove the specified files on the next commit
425 425 serve start stand-alone webserver
426 426 status, st show changed files in the working directory
427 427 summary, sum summarize working directory state
428 428 update, up, checkout, co
429 429 update working directory (or switch revisions)
430 430
431 431 global options ([+] can be repeated):
432 432
433 433 -R --repository REPO repository root directory or name of overlay bundle
434 434 file
435 435 --cwd DIR change working directory
436 436 -y --noninteractive do not prompt, automatically pick the first choice for
437 437 all prompts
438 438 -q --quiet suppress output
439 439 -v --verbose enable additional output
440 440 --color TYPE when to colorize (boolean, always, auto, never, or
441 441 debug)
442 442 --config CONFIG [+] set/override config option (use 'section.name=value')
443 443 --debug enable debugging output
444 444 --debugger start debugger
445 445 --encoding ENCODE set the charset encoding (default: ascii)
446 446 --encodingmode MODE set the charset encoding mode (default: strict)
447 447 --traceback always print a traceback on exception
448 448 --time time how long the command takes
449 449 --profile print command execution profile
450 450 --version output version information and exit
451 451 -h --help display help and exit
452 452 --hidden consider hidden changesets
453 453 --pager TYPE when to paginate (boolean, always, auto, or never)
454 454 (default: auto)
455 455
456 456 (use 'hg help' for the full list of commands)
457 457
458 458 $ hg add -h
459 459 hg add [OPTION]... [FILE]...
460 460
461 461 add the specified files on the next commit
462 462
463 463 Schedule files to be version controlled and added to the repository.
464 464
465 465 The files will be added to the repository at the next commit. To undo an
466 466 add before that, see 'hg forget'.
467 467
468 468 If no names are given, add all files to the repository (except files
469 469 matching ".hgignore").
470 470
471 471 Returns 0 if all files are successfully added.
472 472
473 473 options ([+] can be repeated):
474 474
475 475 -I --include PATTERN [+] include names matching the given patterns
476 476 -X --exclude PATTERN [+] exclude names matching the given patterns
477 477 -S --subrepos recurse into subrepositories
478 478 -n --dry-run do not perform actions, just print output
479 479
480 480 (some details hidden, use --verbose to show complete help)
481 481
482 482 Verbose help for add
483 483
484 484 $ hg add -hv
485 485 hg add [OPTION]... [FILE]...
486 486
487 487 add the specified files on the next commit
488 488
489 489 Schedule files to be version controlled and added to the repository.
490 490
491 491 The files will be added to the repository at the next commit. To undo an
492 492 add before that, see 'hg forget'.
493 493
494 494 If no names are given, add all files to the repository (except files
495 495 matching ".hgignore").
496 496
497 497 Examples:
498 498
499 499 - New (unknown) files are added automatically by 'hg add':
500 500
501 501 $ ls
502 502 foo.c
503 503 $ hg status
504 504 ? foo.c
505 505 $ hg add
506 506 adding foo.c
507 507 $ hg status
508 508 A foo.c
509 509
510 510 - Specific files to be added can be specified:
511 511
512 512 $ ls
513 513 bar.c foo.c
514 514 $ hg status
515 515 ? bar.c
516 516 ? foo.c
517 517 $ hg add bar.c
518 518 $ hg status
519 519 A bar.c
520 520 ? foo.c
521 521
522 522 Returns 0 if all files are successfully added.
523 523
524 524 options ([+] can be repeated):
525 525
526 526 -I --include PATTERN [+] include names matching the given patterns
527 527 -X --exclude PATTERN [+] exclude names matching the given patterns
528 528 -S --subrepos recurse into subrepositories
529 529 -n --dry-run do not perform actions, just print output
530 530
531 531 global options ([+] can be repeated):
532 532
533 533 -R --repository REPO repository root directory or name of overlay bundle
534 534 file
535 535 --cwd DIR change working directory
536 536 -y --noninteractive do not prompt, automatically pick the first choice for
537 537 all prompts
538 538 -q --quiet suppress output
539 539 -v --verbose enable additional output
540 540 --color TYPE when to colorize (boolean, always, auto, never, or
541 541 debug)
542 542 --config CONFIG [+] set/override config option (use 'section.name=value')
543 543 --debug enable debugging output
544 544 --debugger start debugger
545 545 --encoding ENCODE set the charset encoding (default: ascii)
546 546 --encodingmode MODE set the charset encoding mode (default: strict)
547 547 --traceback always print a traceback on exception
548 548 --time time how long the command takes
549 549 --profile print command execution profile
550 550 --version output version information and exit
551 551 -h --help display help and exit
552 552 --hidden consider hidden changesets
553 553 --pager TYPE when to paginate (boolean, always, auto, or never)
554 554 (default: auto)
555 555
556 556 Test the textwidth config option
557 557
558 558 $ hg root -h --config ui.textwidth=50
559 559 hg root
560 560
561 561 print the root (top) of the current working
562 562 directory
563 563
564 564 Print the root directory of the current
565 565 repository.
566 566
567 567 Returns 0 on success.
568 568
569 569 options:
570 570
571 571 -T --template TEMPLATE display with template
572 572
573 573 (some details hidden, use --verbose to show
574 574 complete help)
575 575
576 576 Test help option with version option
577 577
578 578 $ hg add -h --version
579 579 Mercurial Distributed SCM (version *) (glob)
580 580 (see https://mercurial-scm.org for more information)
581 581
582 582 Copyright (C) 2005-* Olivia Mackall and others (glob)
583 583 This is free software; see the source for copying conditions. There is NO
584 584 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
585 585
586 586 $ hg add --skjdfks
587 587 hg add: option --skjdfks not recognized
588 588 hg add [OPTION]... [FILE]...
589 589
590 590 add the specified files on the next commit
591 591
592 592 options ([+] can be repeated):
593 593
594 594 -I --include PATTERN [+] include names matching the given patterns
595 595 -X --exclude PATTERN [+] exclude names matching the given patterns
596 596 -S --subrepos recurse into subrepositories
597 597 -n --dry-run do not perform actions, just print output
598 598
599 599 (use 'hg add -h' to show more help)
600 600 [10]
601 601
602 602 Test ambiguous command help
603 603
604 604 $ hg help ad
605 605 list of commands:
606 606
607 607 add add the specified files on the next commit
608 608 addremove add all new files, delete all missing files
609 609
610 610 (use 'hg help -v ad' to show built-in aliases and global options)
611 611
612 612 Test command without options
613 613
614 614 $ hg help verify
615 615 hg verify
616 616
617 617 verify the integrity of the repository
618 618
619 619 Verify the integrity of the current repository.
620 620
621 621 This will perform an extensive check of the repository's integrity,
622 622 validating the hashes and checksums of each entry in the changelog,
623 623 manifest, and tracked files, as well as the integrity of their crosslinks
624 624 and indices.
625 625
626 626 Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
627 627 information about recovery from corruption of the repository.
628 628
629 629 Returns 0 on success, 1 if errors are encountered.
630 630
631 631 options:
632 632
633 633 (some details hidden, use --verbose to show complete help)
634 634
635 635 $ hg help diff
636 636 hg diff [OPTION]... ([-c REV] | [--from REV1] [--to REV2]) [FILE]...
637 637
638 638 diff repository (or selected files)
639 639
640 640 Show differences between revisions for the specified files.
641 641
642 642 Differences between files are shown using the unified diff format.
643 643
644 644 Note:
645 645 'hg diff' may generate unexpected results for merges, as it will
646 646 default to comparing against the working directory's first parent
647 647 changeset if no revisions are specified. To diff against the conflict
648 648 regions, you can use '--config diff.merge=yes'.
649 649
650 650 By default, the working directory files are compared to its first parent.
651 651 To see the differences from another revision, use --from. To see the
652 652 difference to another revision, use --to. For example, 'hg diff --from .^'
653 653 will show the differences from the working copy's grandparent to the
654 654 working copy, 'hg diff --to .' will show the diff from the working copy to
655 655 its parent (i.e. the reverse of the default), and 'hg diff --from 1.0 --to
656 656 1.2' will show the diff between those two revisions.
657 657
658 658 Alternatively you can specify -c/--change with a revision to see the
659 659 changes in that changeset relative to its first parent (i.e. 'hg diff -c
660 660 42' is equivalent to 'hg diff --from 42^ --to 42')
661 661
662 662 Without the -a/--text option, diff will avoid generating diffs of files it
663 663 detects as binary. With -a, diff will generate a diff anyway, probably
664 664 with undesirable results.
665 665
666 666 Use the -g/--git option to generate diffs in the git extended diff format.
667 667 For more information, read 'hg help diffs'.
668 668
669 669 Returns 0 on success.
670 670
671 671 options ([+] can be repeated):
672 672
673 673 --from REV1 revision to diff from
674 674 --to REV2 revision to diff to
675 675 -c --change REV change made by revision
676 676 -a --text treat all files as text
677 677 -g --git use git extended diff format
678 678 --binary generate binary diffs in git mode (default)
679 679 --nodates omit dates from diff headers
680 680 --noprefix omit a/ and b/ prefixes from filenames
681 681 -p --show-function show which function each change is in
682 682 --reverse produce a diff that undoes the changes
683 683 -w --ignore-all-space ignore white space when comparing lines
684 684 -b --ignore-space-change ignore changes in the amount of white space
685 685 -B --ignore-blank-lines ignore changes whose lines are all blank
686 686 -Z --ignore-space-at-eol ignore changes in whitespace at EOL
687 687 -U --unified NUM number of lines of context to show
688 688 --stat output diffstat-style summary of changes
689 689 --root DIR produce diffs relative to subdirectory
690 690 -I --include PATTERN [+] include names matching the given patterns
691 691 -X --exclude PATTERN [+] exclude names matching the given patterns
692 692 -S --subrepos recurse into subrepositories
693 693
694 694 (some details hidden, use --verbose to show complete help)
695 695
696 696 $ hg help status
697 697 hg status [OPTION]... [FILE]...
698 698
699 699 aliases: st
700 700
701 701 show changed files in the working directory
702 702
703 703 Show status of files in the repository. If names are given, only files
704 704 that match are shown. Files that are clean or ignored or the source of a
705 705 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
706 706 -C/--copies or -A/--all are given. Unless options described with "show
707 707 only ..." are given, the options -mardu are used.
708 708
709 709 Option -q/--quiet hides untracked (unknown and ignored) files unless
710 710 explicitly requested with -u/--unknown or -i/--ignored.
711 711
712 712 Note:
713 713 'hg status' may appear to disagree with diff if permissions have
714 714 changed or a merge has occurred. The standard diff format does not
715 715 report permission changes and diff only reports changes relative to one
716 716 merge parent.
717 717
718 718 If one revision is given, it is used as the base revision. If two
719 719 revisions are given, the differences between them are shown. The --change
720 720 option can also be used as a shortcut to list the changed files of a
721 721 revision from its first parent.
722 722
723 723 The codes used to show the status of files are:
724 724
725 725 M = modified
726 726 A = added
727 727 R = removed
728 728 C = clean
729 729 ! = missing (deleted by non-hg command, but still tracked)
730 730 ? = not tracked
731 731 I = ignored
732 732 = origin of the previous file (with --copies)
733 733
734 734 Returns 0 on success.
735 735
736 736 options ([+] can be repeated):
737 737
738 738 -A --all show status of all files
739 739 -m --modified show only modified files
740 740 -a --added show only added files
741 741 -r --removed show only removed files
742 742 -d --deleted show only missing files
743 743 -c --clean show only files without changes
744 744 -u --unknown show only unknown (not tracked) files
745 745 -i --ignored show only ignored files
746 746 -n --no-status hide status prefix
747 747 -C --copies show source of copied files
748 748 -0 --print0 end filenames with NUL, for use with xargs
749 749 --rev REV [+] show difference from revision
750 750 --change REV list the changed files of a revision
751 751 -I --include PATTERN [+] include names matching the given patterns
752 752 -X --exclude PATTERN [+] exclude names matching the given patterns
753 753 -S --subrepos recurse into subrepositories
754 754 -T --template TEMPLATE display with template
755 755
756 756 (some details hidden, use --verbose to show complete help)
757 757
758 758 $ hg -q help status
759 759 hg status [OPTION]... [FILE]...
760 760
761 761 show changed files in the working directory
762 762
763 763 $ hg help foo
764 764 abort: no such help topic: foo
765 765 (try 'hg help --keyword foo')
766 766 [10]
767 767
768 768 $ hg skjdfks
769 769 hg: unknown command 'skjdfks'
770 770 (use 'hg help' for a list of commands)
771 771 [10]
772 772
773 773 Typoed command gives suggestion
774 774 $ hg puls
775 775 hg: unknown command 'puls'
776 776 (did you mean one of pull, push?)
777 777 [10]
778 778
779 779 Not enabled extension gets suggested
780 780
781 781 $ hg rebase
782 782 hg: unknown command 'rebase'
783 783 'rebase' is provided by the following extension:
784 784
785 785 rebase command to move sets of revisions to a different ancestor
786 786
787 787 (use 'hg help extensions' for information on enabling extensions)
788 788 [10]
789 789
790 790 Disabled extension gets suggested
791 791 $ hg --config extensions.rebase=! rebase
792 792 hg: unknown command 'rebase'
793 793 'rebase' is provided by the following extension:
794 794
795 795 rebase command to move sets of revisions to a different ancestor
796 796
797 797 (use 'hg help extensions' for information on enabling extensions)
798 798 [10]
799 799
800 800 Checking that help adapts based on the config:
801 801
802 802 $ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)'
803 803 -g --[no-]git use git extended diff format (default: on from
804 804 config)
805 805
806 806 Make sure that we don't run afoul of the help system thinking that
807 807 this is a section and erroring out weirdly.
808 808
809 809 $ hg .log
810 810 hg: unknown command '.log'
811 811 (did you mean log?)
812 812 [10]
813 813
814 814 $ hg log.
815 815 hg: unknown command 'log.'
816 816 (did you mean log?)
817 817 [10]
818 818 $ hg pu.lh
819 819 hg: unknown command 'pu.lh'
820 820 (did you mean one of pull, push?)
821 821 [10]
822 822
823 823 $ cat > helpext.py <<EOF
824 824 > import os
825 825 > from mercurial import commands, fancyopts, registrar
826 826 >
827 827 > def func(arg):
828 828 > return '%sfoo' % arg
829 829 > class customopt(fancyopts.customopt):
830 830 > def newstate(self, oldstate, newparam, abort):
831 831 > return '%sbar' % oldstate
832 832 > cmdtable = {}
833 833 > command = registrar.command(cmdtable)
834 834 >
835 835 > @command(b'nohelp',
836 836 > [(b'', b'longdesc', 3, b'x'*67),
837 837 > (b'n', b'', None, b'normal desc'),
838 838 > (b'', b'newline', b'', b'line1\nline2'),
839 839 > (b'', b'default-off', False, b'enable X'),
840 840 > (b'', b'default-on', True, b'enable Y'),
841 841 > (b'', b'callableopt', func, b'adds foo'),
842 842 > (b'', b'customopt', customopt(''), b'adds bar'),
843 843 > (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
844 844 > b'hg nohelp',
845 845 > norepo=True)
846 846 > @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
847 847 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
848 848 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
849 849 > def nohelp(ui, *args, **kwargs):
850 850 > pass
851 851 >
852 852 > @command(b'hashelp', [], b'hg hashelp', norepo=True)
853 853 > def hashelp(ui, *args, **kwargs):
854 854 > """Extension command's help"""
855 855 >
856 856 > def uisetup(ui):
857 857 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
858 858 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
859 859 > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext')
860 860 > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext')
861 861 > ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext')
862 862 >
863 863 > EOF
864 864 $ echo '[extensions]' >> $HGRCPATH
865 865 $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
866 866
867 867 Test for aliases
868 868
869 869 $ hg help | grep hgalias
870 870 hgalias My doc
871 871
872 872 $ hg help hgalias
873 873 hg hgalias [--remote]
874 874
875 875 alias for: hg summary
876 876
877 877 My doc
878 878
879 879 defined by: helpext
880 880
881 881 options:
882 882
883 883 --remote check for push and pull
884 884
885 885 (some details hidden, use --verbose to show complete help)
886 886 $ hg help hgaliasnodoc
887 887 hg hgaliasnodoc [--remote]
888 888
889 889 alias for: hg summary
890 890
891 891 summarize working directory state
892 892
893 893 This generates a brief summary of the working directory state, including
894 894 parents, branch, commit status, phase and available updates.
895 895
896 896 With the --remote option, this will check the default paths for incoming
897 897 and outgoing changes. This can be time-consuming.
898 898
899 899 Returns 0 on success.
900 900
901 901 defined by: helpext
902 902
903 903 options:
904 904
905 905 --remote check for push and pull
906 906
907 907 (some details hidden, use --verbose to show complete help)
908 908
909 909 $ hg help shellalias
910 910 hg shellalias
911 911
912 912 shell alias for: echo hi
913 913
914 914 (no help text available)
915 915
916 916 defined by: helpext
917 917
918 918 (some details hidden, use --verbose to show complete help)
919 919
920 920 Test command with no help text
921 921
922 922 $ hg help nohelp
923 923 hg nohelp
924 924
925 925 (no help text available)
926 926
927 927 options:
928 928
929 929 --longdesc VALUE
930 930 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
931 931 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
932 932 -n -- normal desc
933 933 --newline VALUE line1 line2
934 934 --default-off enable X
935 935 --[no-]default-on enable Y (default: on)
936 936 --callableopt VALUE adds foo
937 937 --customopt VALUE adds bar
938 938 --customopt-withdefault VALUE adds bar (default: foo)
939 939
940 940 (some details hidden, use --verbose to show complete help)
941 941
942 942 Test that default list of commands includes extension commands that have help,
943 943 but not those that don't, except in verbose mode, when a keyword is passed, or
944 944 when help about the extension is requested.
945 945
946 946 #if no-extraextensions
947 947
948 948 $ hg help | grep hashelp
949 949 hashelp Extension command's help
950 950 $ hg help | grep nohelp
951 951 [1]
952 952 $ hg help -v | grep nohelp
953 953 nohelp (no help text available)
954 954
955 955 $ hg help -k nohelp
956 956 Commands:
957 957
958 958 nohelp hg nohelp
959 959
960 960 Extension Commands:
961 961
962 962 nohelp (no help text available)
963 963
964 964 $ hg help helpext
965 965 helpext extension - no help text available
966 966
967 967 list of commands:
968 968
969 969 hashelp Extension command's help
970 970 nohelp (no help text available)
971 971
972 972 (use 'hg help -v helpext' to show built-in aliases and global options)
973 973
974 974 #endif
975 975
976 976 Test list of internal help commands
977 977
978 978 $ hg help debug
979 979 debug commands (internal and unsupported):
980 980
981 981 debug-delta-find
982 982 display the computation to get to a valid delta for storing REV
983 983 debug-repair-issue6528
984 984 find affected revisions and repair them. See issue6528 for more
985 985 details.
986 986 debug-revlog-index
987 987 dump index data for a revlog
988 988 debugancestor
989 989 find the ancestor revision of two revisions in a given index
990 990 debugantivirusrunning
991 991 attempt to trigger an antivirus scanner to see if one is active
992 992 debugapplystreamclonebundle
993 993 apply a stream clone bundle file
994 994 debugbackupbundle
995 995 lists the changesets available in backup bundles
996 996 debugbuilddag
997 997 builds a repo with a given DAG from scratch in the current
998 998 empty repo
999 999 debugbundle lists the contents of a bundle
1000 1000 debugcapabilities
1001 1001 lists the capabilities of a remote peer
1002 1002 debugchangedfiles
1003 1003 list the stored files changes for a revision
1004 1004 debugcheckstate
1005 1005 validate the correctness of the current dirstate
1006 1006 debugcolor show available color, effects or style
1007 1007 debugcommands
1008 1008 list all available commands and options
1009 1009 debugcomplete
1010 1010 returns the completion list associated with the given command
1011 1011 debugcreatestreamclonebundle
1012 1012 create a stream clone bundle file
1013 1013 debugdag format the changelog or an index DAG as a concise textual
1014 1014 description
1015 1015 debugdata dump the contents of a data file revision
1016 1016 debugdate parse and display a date
1017 1017 debugdeltachain
1018 1018 dump information about delta chains in a revlog
1019 1019 debugdirstate
1020 1020 show the contents of the current dirstate
1021 1021 debugdirstateignorepatternshash
1022 1022 show the hash of ignore patterns stored in dirstate if v2,
1023 1023 debugdiscovery
1024 1024 runs the changeset discovery protocol in isolation
1025 1025 debugdownload
1026 1026 download a resource using Mercurial logic and config
1027 1027 debugextensions
1028 1028 show information about active extensions
1029 1029 debugfileset parse and apply a fileset specification
1030 1030 debugformat display format information about the current repository
1031 1031 debugfsinfo show information detected about current filesystem
1032 1032 debuggetbundle
1033 1033 retrieves a bundle from a repo
1034 1034 debugignore display the combined ignore pattern and information about
1035 1035 ignored files
1036 1036 debugindexdot
1037 1037 dump an index DAG as a graphviz dot file
1038 1038 debugindexstats
1039 1039 show stats related to the changelog index
1040 1040 debuginstall test Mercurial installation
1041 1041 debugknown test whether node ids are known to a repo
1042 1042 debuglocks show or modify state of locks
1043 1043 debugmanifestfulltextcache
1044 1044 show, clear or amend the contents of the manifest fulltext
1045 1045 cache
1046 1046 debugmergestate
1047 1047 print merge state
1048 1048 debugnamecomplete
1049 1049 complete "names" - tags, open branch names, bookmark names
1050 1050 debugnodemap write and inspect on disk nodemap
1051 1051 debugobsolete
1052 1052 create arbitrary obsolete marker
1053 1053 debugoptADV (no help text available)
1054 1054 debugoptDEP (no help text available)
1055 1055 debugoptEXP (no help text available)
1056 1056 debugp1copies
1057 1057 dump copy information compared to p1
1058 1058 debugp2copies
1059 1059 dump copy information compared to p2
1060 1060 debugpathcomplete
1061 1061 complete part or all of a tracked path
1062 1062 debugpathcopies
1063 1063 show copies between two revisions
1064 1064 debugpeer establish a connection to a peer repository
1065 1065 debugpickmergetool
1066 1066 examine which merge tool is chosen for specified file
1067 1067 debugpushkey access the pushkey key/value protocol
1068 1068 debugpvec (no help text available)
1069 1069 debugrebuilddirstate
1070 1070 rebuild the dirstate as it would look like for the given
1071 1071 revision
1072 1072 debugrebuildfncache
1073 1073 rebuild the fncache file
1074 1074 debugrename dump rename information
1075 1075 debugrequires
1076 1076 print the current repo requirements
1077 1077 debugrevlog show data and statistics about a revlog
1078 1078 debugrevlogindex
1079 1079 dump the contents of a revlog index
1080 1080 debugrevspec parse and apply a revision specification
1081 1081 debugserve run a server with advanced settings
1082 1082 debugsetparents
1083 1083 manually set the parents of the current working directory
1084 1084 (DANGEROUS)
1085 1085 debugshell run an interactive Python interpreter
1086 1086 debugsidedata
1087 1087 dump the side data for a cl/manifest/file revision
1088 1088 debugssl test a secure connection to a server
1089 1089 debugstrip strip changesets and all their descendants from the repository
1090 1090 debugsub (no help text available)
1091 1091 debugsuccessorssets
1092 1092 show set of successors for revision
1093 1093 debugtagscache
1094 1094 display the contents of .hg/cache/hgtagsfnodes1
1095 1095 debugtemplate
1096 1096 parse and apply a template
1097 1097 debuguigetpass
1098 1098 show prompt to type password
1099 1099 debuguiprompt
1100 1100 show plain prompt
1101 1101 debugupdatecaches
1102 1102 warm all known caches in the repository
1103 1103 debugupgraderepo
1104 1104 upgrade a repository to use different features
1105 1105 debugwalk show how files match on given patterns
1106 1106 debugwhyunstable
1107 1107 explain instabilities of a changeset
1108 1108 debugwireargs
1109 1109 (no help text available)
1110 1110 debugwireproto
1111 1111 send wire protocol commands to a server
1112 1112
1113 1113 (use 'hg help -v debug' to show built-in aliases and global options)
1114 1114
1115 1115 internals topic renders index of available sub-topics
1116 1116
1117 1117 $ hg help internals
1118 1118 Technical implementation topics
1119 1119 """""""""""""""""""""""""""""""
1120 1120
1121 1121 To access a subtopic, use "hg help internals.{subtopic-name}"
1122 1122
1123 1123 bid-merge Bid Merge Algorithm
1124 1124 bundle2 Bundle2
1125 1125 bundles Bundles
1126 1126 cbor CBOR
1127 1127 censor Censor
1128 1128 changegroups Changegroups
1129 1129 config Config Registrar
1130 1130 dirstate-v2 dirstate-v2 file format
1131 1131 extensions Extension API
1132 1132 mergestate Mergestate
1133 1133 requirements Repository Requirements
1134 1134 revlogs Revision Logs
1135 1135 wireprotocol Wire Protocol
1136 1136 wireprotocolrpc
1137 1137 Wire Protocol RPC
1138 1138 wireprotocolv2
1139 1139 Wire Protocol Version 2
1140 1140
1141 1141 sub-topics can be accessed
1142 1142
1143 1143 $ hg help internals.changegroups
1144 1144 Changegroups
1145 1145 """"""""""""
1146 1146
1147 1147 Changegroups are representations of repository revlog data, specifically
1148 1148 the changelog data, root/flat manifest data, treemanifest data, and
1149 1149 filelogs.
1150 1150
1151 1151 There are 4 versions of changegroups: "1", "2", "3" and "4". From a high-
1152 1152 level, versions "1" and "2" are almost exactly the same, with the only
1153 1153 difference being an additional item in the *delta header*. Version "3"
1154 1154 adds support for storage flags in the *delta header* and optionally
1155 1155 exchanging treemanifests (enabled by setting an option on the
1156 1156 "changegroup" part in the bundle2). Version "4" adds support for
1157 1157 exchanging sidedata (additional revision metadata not part of the digest).
1158 1158
1159 1159 Changegroups when not exchanging treemanifests consist of 3 logical
1160 1160 segments:
1161 1161
1162 1162 +---------------------------------+
1163 1163 | | | |
1164 1164 | changeset | manifest | filelogs |
1165 1165 | | | |
1166 1166 | | | |
1167 1167 +---------------------------------+
1168 1168
1169 1169 When exchanging treemanifests, there are 4 logical segments:
1170 1170
1171 1171 +-------------------------------------------------+
1172 1172 | | | | |
1173 1173 | changeset | root | treemanifests | filelogs |
1174 1174 | | manifest | | |
1175 1175 | | | | |
1176 1176 +-------------------------------------------------+
1177 1177
1178 1178 The principle building block of each segment is a *chunk*. A *chunk* is a
1179 1179 framed piece of data:
1180 1180
1181 1181 +---------------------------------------+
1182 1182 | | |
1183 1183 | length | data |
1184 1184 | (4 bytes) | (<length - 4> bytes) |
1185 1185 | | |
1186 1186 +---------------------------------------+
1187 1187
1188 1188 All integers are big-endian signed integers. Each chunk starts with a
1189 1189 32-bit integer indicating the length of the entire chunk (including the
1190 1190 length field itself).
1191 1191
1192 1192 There is a special case chunk that has a value of 0 for the length
1193 1193 ("0x00000000"). We call this an *empty chunk*.
1194 1194
1195 1195 Delta Groups
1196 1196 ============
1197 1197
1198 1198 A *delta group* expresses the content of a revlog as a series of deltas,
1199 1199 or patches against previous revisions.
1200 1200
1201 1201 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
1202 1202 to signal the end of the delta group:
1203 1203
1204 1204 +------------------------------------------------------------------------+
1205 1205 | | | | | |
1206 1206 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
1207 1207 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
1208 1208 | | | | | |
1209 1209 +------------------------------------------------------------------------+
1210 1210
1211 1211 Each *chunk*'s data consists of the following:
1212 1212
1213 1213 +---------------------------------------+
1214 1214 | | |
1215 1215 | delta header | delta data |
1216 1216 | (various by version) | (various) |
1217 1217 | | |
1218 1218 +---------------------------------------+
1219 1219
1220 1220 The *delta data* is a series of *delta*s that describe a diff from an
1221 1221 existing entry (either that the recipient already has, or previously
1222 1222 specified in the bundle/changegroup).
1223 1223
1224 1224 The *delta header* is different between versions "1", "2", "3" and "4" of
1225 1225 the changegroup format.
1226 1226
1227 1227 Version 1 (headerlen=80):
1228 1228
1229 1229 +------------------------------------------------------+
1230 1230 | | | | |
1231 1231 | node | p1 node | p2 node | link node |
1232 1232 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1233 1233 | | | | |
1234 1234 +------------------------------------------------------+
1235 1235
1236 1236 Version 2 (headerlen=100):
1237 1237
1238 1238 +------------------------------------------------------------------+
1239 1239 | | | | | |
1240 1240 | node | p1 node | p2 node | base node | link node |
1241 1241 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
1242 1242 | | | | | |
1243 1243 +------------------------------------------------------------------+
1244 1244
1245 1245 Version 3 (headerlen=102):
1246 1246
1247 1247 +------------------------------------------------------------------------------+
1248 1248 | | | | | | |
1249 1249 | node | p1 node | p2 node | base node | link node | flags |
1250 1250 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
1251 1251 | | | | | | |
1252 1252 +------------------------------------------------------------------------------+
1253 1253
1254 1254 Version 4 (headerlen=103):
1255 1255
1256 1256 +------------------------------------------------------------------------------+----------+
1257 1257 | | | | | | | |
1258 1258 | node | p1 node | p2 node | base node | link node | flags | pflags |
1259 1259 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | (1 byte) |
1260 1260 | | | | | | | |
1261 1261 +------------------------------------------------------------------------------+----------+
1262 1262
1263 1263 The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
1264 1264 contain a series of *delta*s, densely packed (no separators). These deltas
1265 1265 describe a diff from an existing entry (either that the recipient already
1266 1266 has, or previously specified in the bundle/changegroup). The format is
1267 1267 described more fully in "hg help internals.bdiff", but briefly:
1268 1268
1269 1269 +---------------------------------------------------------------+
1270 1270 | | | | |
1271 1271 | start offset | end offset | new length | content |
1272 1272 | (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
1273 1273 | | | | |
1274 1274 +---------------------------------------------------------------+
1275 1275
1276 1276 Please note that the length field in the delta data does *not* include
1277 1277 itself.
1278 1278
1279 1279 In version 1, the delta is always applied against the previous node from
1280 1280 the changegroup or the first parent if this is the first entry in the
1281 1281 changegroup.
1282 1282
1283 1283 In version 2 and up, the delta base node is encoded in the entry in the
1284 1284 changegroup. This allows the delta to be expressed against any parent,
1285 1285 which can result in smaller deltas and more efficient encoding of data.
1286 1286
1287 1287 The *flags* field holds bitwise flags affecting the processing of revision
1288 1288 data. The following flags are defined:
1289 1289
1290 1290 32768
1291 1291 Censored revision. The revision's fulltext has been replaced by censor
1292 1292 metadata. May only occur on file revisions.
1293 1293
1294 1294 16384
1295 1295 Ellipsis revision. Revision hash does not match data (likely due to
1296 1296 rewritten parents).
1297 1297
1298 1298 8192
1299 1299 Externally stored. The revision fulltext contains "key:value" "\n"
1300 1300 delimited metadata defining an object stored elsewhere. Used by the LFS
1301 1301 extension.
1302 1302
1303 1303 4096
1304 1304 Contains copy information. This revision changes files in a way that
1305 1305 could affect copy tracing. This does *not* affect changegroup handling,
1306 1306 but is relevant for other parts of Mercurial.
1307 1307
1308 1308 For historical reasons, the integer values are identical to revlog version
1309 1309 1 per-revision storage flags and correspond to bits being set in this
1310 1310 2-byte field. Bits were allocated starting from the most-significant bit,
1311 1311 hence the reverse ordering and allocation of these flags.
1312 1312
1313 1313 The *pflags* (protocol flags) field holds bitwise flags affecting the
1314 1314 protocol itself. They are first in the header since they may affect the
1315 1315 handling of the rest of the fields in a future version. They are defined
1316 1316 as such:
1317 1317
1318 1318 1 indicates whether to read a chunk of sidedata (of variable length) right
1319 1319 after the revision flags.
1320 1320
1321 1321 Changeset Segment
1322 1322 =================
1323 1323
1324 1324 The *changeset segment* consists of a single *delta group* holding
1325 1325 changelog data. The *empty chunk* at the end of the *delta group* denotes
1326 1326 the boundary to the *manifest segment*.
1327 1327
1328 1328 Manifest Segment
1329 1329 ================
1330 1330
1331 1331 The *manifest segment* consists of a single *delta group* holding manifest
1332 1332 data. If treemanifests are in use, it contains only the manifest for the
1333 1333 root directory of the repository. Otherwise, it contains the entire
1334 1334 manifest data. The *empty chunk* at the end of the *delta group* denotes
1335 1335 the boundary to the next segment (either the *treemanifests segment* or
1336 1336 the *filelogs segment*, depending on version and the request options).
1337 1337
1338 1338 Treemanifests Segment
1339 1339 ---------------------
1340 1340
1341 1341 The *treemanifests segment* only exists in changegroup version "3" and
1342 1342 "4", and only if the 'treemanifest' param is part of the bundle2
1343 1343 changegroup part (it is not possible to use changegroup version 3 or 4
1344 1344 outside of bundle2). Aside from the filenames in the *treemanifests
1345 1345 segment* containing a trailing "/" character, it behaves identically to
1346 1346 the *filelogs segment* (see below). The final sub-segment is followed by
1347 1347 an *empty chunk* (logically, a sub-segment with filename size 0). This
1348 1348 denotes the boundary to the *filelogs segment*.
1349 1349
1350 1350 Filelogs Segment
1351 1351 ================
1352 1352
1353 1353 The *filelogs segment* consists of multiple sub-segments, each
1354 1354 corresponding to an individual file whose data is being described:
1355 1355
1356 1356 +--------------------------------------------------+
1357 1357 | | | | | |
1358 1358 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
1359 1359 | | | | | (4 bytes) |
1360 1360 | | | | | |
1361 1361 +--------------------------------------------------+
1362 1362
1363 1363 The final filelog sub-segment is followed by an *empty chunk* (logically,
1364 1364 a sub-segment with filename size 0). This denotes the end of the segment
1365 1365 and of the overall changegroup.
1366 1366
1367 1367 Each filelog sub-segment consists of the following:
1368 1368
1369 1369 +------------------------------------------------------+
1370 1370 | | | |
1371 1371 | filename length | filename | delta group |
1372 1372 | (4 bytes) | (<length - 4> bytes) | (various) |
1373 1373 | | | |
1374 1374 +------------------------------------------------------+
1375 1375
1376 1376 That is, a *chunk* consisting of the filename (not terminated or padded)
1377 1377 followed by N chunks constituting the *delta group* for this file. The
1378 1378 *empty chunk* at the end of each *delta group* denotes the boundary to the
1379 1379 next filelog sub-segment.
1380 1380
1381 1381 non-existent subtopics print an error
1382 1382
1383 1383 $ hg help internals.foo
1384 1384 abort: no such help topic: internals.foo
1385 1385 (try 'hg help --keyword foo')
1386 1386 [10]
1387 1387
1388 1388 test advanced, deprecated and experimental options are hidden in command help
1389 1389 $ hg help debugoptADV
1390 1390 hg debugoptADV
1391 1391
1392 1392 (no help text available)
1393 1393
1394 1394 options:
1395 1395
1396 1396 (some details hidden, use --verbose to show complete help)
1397 1397 $ hg help debugoptDEP
1398 1398 hg debugoptDEP
1399 1399
1400 1400 (no help text available)
1401 1401
1402 1402 options:
1403 1403
1404 1404 (some details hidden, use --verbose to show complete help)
1405 1405
1406 1406 $ hg help debugoptEXP
1407 1407 hg debugoptEXP
1408 1408
1409 1409 (no help text available)
1410 1410
1411 1411 options:
1412 1412
1413 1413 (some details hidden, use --verbose to show complete help)
1414 1414
1415 1415 test advanced, deprecated and experimental options are shown with -v
1416 1416 $ hg help -v debugoptADV | grep aopt
1417 1417 --aopt option is (ADVANCED)
1418 1418 $ hg help -v debugoptDEP | grep dopt
1419 1419 --dopt option is (DEPRECATED)
1420 1420 $ hg help -v debugoptEXP | grep eopt
1421 1421 --eopt option is (EXPERIMENTAL)
1422 1422
1423 1423 #if gettext
1424 1424 test deprecated option is hidden with translation with untranslated description
1425 1425 (use many globy for not failing on changed transaction)
1426 1426 $ LANGUAGE=sv hg help debugoptDEP
1427 1427 hg debugoptDEP
1428 1428
1429 1429 (*) (glob)
1430 1430
1431 1431 options:
1432 1432
1433 1433 (some details hidden, use --verbose to show complete help)
1434 1434 #endif
1435 1435
1436 1436 Test commands that collide with topics (issue4240)
1437 1437
1438 1438 $ hg config -hq
1439 1439 hg config [-u] [NAME]...
1440 1440
1441 1441 show combined config settings from all hgrc files
1442 1442 $ hg showconfig -hq
1443 1443 hg config [-u] [NAME]...
1444 1444
1445 1445 show combined config settings from all hgrc files
1446 1446
1447 1447 Test a help topic
1448 1448
1449 1449 $ hg help dates
1450 1450 Date Formats
1451 1451 """"""""""""
1452 1452
1453 1453 Some commands allow the user to specify a date, e.g.:
1454 1454
1455 1455 - backout, commit, import, tag: Specify the commit date.
1456 1456 - log, revert, update: Select revision(s) by date.
1457 1457
1458 1458 Many date formats are valid. Here are some examples:
1459 1459
1460 1460 - "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1461 1461 - "Dec 6 13:18 -0600" (year assumed, time offset provided)
1462 1462 - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1463 1463 - "Dec 6" (midnight)
1464 1464 - "13:18" (today assumed)
1465 1465 - "3:39" (3:39AM assumed)
1466 1466 - "3:39pm" (15:39)
1467 1467 - "2006-12-06 13:18:29" (ISO 8601 format)
1468 1468 - "2006-12-6 13:18"
1469 1469 - "2006-12-6"
1470 1470 - "12-6"
1471 1471 - "12/6"
1472 1472 - "12/6/6" (Dec 6 2006)
1473 1473 - "today" (midnight)
1474 1474 - "yesterday" (midnight)
1475 1475 - "now" - right now
1476 1476
1477 1477 Lastly, there is Mercurial's internal format:
1478 1478
1479 1479 - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
1480 1480
1481 1481 This is the internal representation format for dates. The first number is
1482 1482 the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
1483 1483 is the offset of the local timezone, in seconds west of UTC (negative if
1484 1484 the timezone is east of UTC).
1485 1485
1486 1486 The log command also accepts date ranges:
1487 1487
1488 1488 - "<DATE" - at or before a given date/time
1489 1489 - ">DATE" - on or after a given date/time
1490 1490 - "DATE to DATE" - a date range, inclusive
1491 1491 - "-DAYS" - within a given number of days from today
1492 1492
1493 1493 Test repeated config section name
1494 1494
1495 1495 $ hg help config.host
1496 1496 "http_proxy.host"
1497 1497 Host name and (optional) port of the proxy server, for example
1498 1498 "myproxy:8000".
1499 1499
1500 1500 "smtp.host"
1501 1501 Host name of mail server, e.g. "mail.example.com".
1502 1502
1503 1503
1504 1504 Test section name with dot
1505 1505
1506 1506 $ hg help config.ui.username
1507 1507 "ui.username"
1508 1508 The committer of a changeset created when running "commit". Typically
1509 1509 a person's name and email address, e.g. "Fred Widget
1510 1510 <fred@example.com>". Environment variables in the username are
1511 1511 expanded.
1512 1512
1513 1513 (default: "$EMAIL" or "username@hostname". If the username in hgrc is
1514 1514 empty, e.g. if the system admin set "username =" in the system hgrc,
1515 1515 it has to be specified manually or in a different hgrc file)
1516 1516
1517 1517
1518 1518 $ hg help config.annotate.git
1519 1519 abort: help section not found: config.annotate.git
1520 1520 [10]
1521 1521
1522 1522 $ hg help config.update.check
1523 1523 "commands.update.check"
1524 1524 Determines what level of checking 'hg update' will perform before
1525 1525 moving to a destination revision. Valid values are "abort", "none",
1526 1526 "linear", and "noconflict".
1527 1527
1528 1528 - "abort" always fails if the working directory has uncommitted
1529 1529 changes.
1530 1530 - "none" performs no checking, and may result in a merge with
1531 1531 uncommitted changes.
1532 1532 - "linear" allows any update as long as it follows a straight line in
1533 1533 the revision history, and may trigger a merge with uncommitted
1534 1534 changes.
1535 1535 - "noconflict" will allow any update which would not trigger a merge
1536 1536 with uncommitted changes, if any are present.
1537 1537
1538 1538 (default: "linear")
1539 1539
1540 1540
1541 1541 $ hg help config.commands.update.check
1542 1542 "commands.update.check"
1543 1543 Determines what level of checking 'hg update' will perform before
1544 1544 moving to a destination revision. Valid values are "abort", "none",
1545 1545 "linear", and "noconflict".
1546 1546
1547 1547 - "abort" always fails if the working directory has uncommitted
1548 1548 changes.
1549 1549 - "none" performs no checking, and may result in a merge with
1550 1550 uncommitted changes.
1551 1551 - "linear" allows any update as long as it follows a straight line in
1552 1552 the revision history, and may trigger a merge with uncommitted
1553 1553 changes.
1554 1554 - "noconflict" will allow any update which would not trigger a merge
1555 1555 with uncommitted changes, if any are present.
1556 1556
1557 1557 (default: "linear")
1558 1558
1559 1559
1560 1560 $ hg help config.ommands.update.check
1561 1561 abort: help section not found: config.ommands.update.check
1562 1562 [10]
1563 1563
1564 1564 Unrelated trailing paragraphs shouldn't be included
1565 1565
1566 1566 $ hg help config.extramsg | grep '^$'
1567 1567
1568 1568
1569 1569 Test capitalized section name
1570 1570
1571 1571 $ hg help scripting.HGPLAIN > /dev/null
1572 1572
1573 1573 Help subsection:
1574 1574
1575 1575 $ hg help config.charsets |grep "Email example:" > /dev/null
1576 1576 [1]
1577 1577
1578 1578 Show nested definitions
1579 1579 ("profiling.type"[break]"ls"[break]"stat"[break])
1580 1580
1581 1581 $ hg help config.type | egrep '^$'|wc -l
1582 1582 \s*3 (re)
1583 1583
1584 1584 $ hg help config.profiling.type.ls
1585 1585 "profiling.type.ls"
1586 1586 Use Python's built-in instrumenting profiler. This profiler works on
1587 1587 all platforms, but each line number it reports is the first line of
1588 1588 a function. This restriction makes it difficult to identify the
1589 1589 expensive parts of a non-trivial function.
1590 1590
1591 1591
1592 1592 Separate sections from subsections
1593 1593
1594 1594 $ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
1595 1595 "format"
1596 1596 --------
1597 1597
1598 1598 "usegeneraldelta"
1599 1599
1600 1600 "dotencode"
1601 1601
1602 1602 "usefncache"
1603 1603
1604 1604 "use-dirstate-v2"
1605 1605
1606 1606 "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories"
1607 1607
1608 "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet"
1609
1608 1610 "use-dirstate-tracked-hint"
1609 1611
1610 1612 "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories"
1611 1613
1612 1614 "use-persistent-nodemap"
1613 1615
1614 1616 "use-share-safe"
1615 1617
1616 1618 "use-share-safe.automatic-upgrade-of-mismatching-repositories"
1617 1619
1618 1620 "use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet"
1619 1621
1620 1622 "usestore"
1621 1623
1622 1624 "sparse-revlog"
1623 1625
1624 1626 "revlog-compression"
1625 1627
1626 1628 "bookmarks-in-store"
1627 1629
1628 1630 "profiling"
1629 1631 -----------
1630 1632
1631 1633 "format"
1632 1634
1633 1635 "progress"
1634 1636 ----------
1635 1637
1636 1638 "format"
1637 1639
1638 1640
1639 1641 Last item in help config.*:
1640 1642
1641 1643 $ hg help config.`hg help config|grep '^ "'| \
1642 1644 > tail -1|sed 's![ "]*!!g'`| \
1643 1645 > grep 'hg help -c config' > /dev/null
1644 1646 [1]
1645 1647
1646 1648 note to use help -c for general hg help config:
1647 1649
1648 1650 $ hg help config |grep 'hg help -c config' > /dev/null
1649 1651
1650 1652 Test templating help
1651 1653
1652 1654 $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
1653 1655 desc String. The text of the changeset description.
1654 1656 diffstat String. Statistics of changes with the following format:
1655 1657 firstline Any text. Returns the first line of text.
1656 1658 nonempty Any text. Returns '(none)' if the string is empty.
1657 1659
1658 1660 Test deprecated items
1659 1661
1660 1662 $ hg help -v templating | grep currentbookmark
1661 1663 currentbookmark
1662 1664 $ hg help templating | (grep currentbookmark || true)
1663 1665
1664 1666 Test help hooks
1665 1667
1666 1668 $ cat > helphook1.py <<EOF
1667 1669 > from mercurial import help
1668 1670 >
1669 1671 > def rewrite(ui, topic, doc):
1670 1672 > return doc + b'\nhelphook1\n'
1671 1673 >
1672 1674 > def extsetup(ui):
1673 1675 > help.addtopichook(b'revisions', rewrite)
1674 1676 > EOF
1675 1677 $ cat > helphook2.py <<EOF
1676 1678 > from mercurial import help
1677 1679 >
1678 1680 > def rewrite(ui, topic, doc):
1679 1681 > return doc + b'\nhelphook2\n'
1680 1682 >
1681 1683 > def extsetup(ui):
1682 1684 > help.addtopichook(b'revisions', rewrite)
1683 1685 > EOF
1684 1686 $ echo '[extensions]' >> $HGRCPATH
1685 1687 $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
1686 1688 $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
1687 1689 $ hg help revsets | grep helphook
1688 1690 helphook1
1689 1691 helphook2
1690 1692
1691 1693 help -c should only show debug --debug
1692 1694
1693 1695 $ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
1694 1696 [1]
1695 1697
1696 1698 help -c should only show deprecated for -v
1697 1699
1698 1700 $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
1699 1701 [1]
1700 1702
1701 1703 Test -s / --system
1702 1704
1703 1705 $ hg help config.files -s windows |grep 'etc/mercurial' | \
1704 1706 > wc -l | sed -e 's/ //g'
1705 1707 0
1706 1708 $ hg help config.files --system unix | grep 'USER' | \
1707 1709 > wc -l | sed -e 's/ //g'
1708 1710 0
1709 1711
1710 1712 Test -e / -c / -k combinations
1711 1713
1712 1714 $ hg help -c|egrep '^[A-Z].*:|^ debug'
1713 1715 Commands:
1714 1716 $ hg help -e|egrep '^[A-Z].*:|^ debug'
1715 1717 Extensions:
1716 1718 $ hg help -k|egrep '^[A-Z].*:|^ debug'
1717 1719 Topics:
1718 1720 Commands:
1719 1721 Extensions:
1720 1722 Extension Commands:
1721 1723 $ hg help -c schemes
1722 1724 abort: no such help topic: schemes
1723 1725 (try 'hg help --keyword schemes')
1724 1726 [10]
1725 1727 $ hg help -e schemes |head -1
1726 1728 schemes extension - extend schemes with shortcuts to repository swarms
1727 1729 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
1728 1730 Commands:
1729 1731 $ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
1730 1732 Extensions:
1731 1733 $ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
1732 1734 Extensions:
1733 1735 Commands:
1734 1736 $ hg help -c commit > /dev/null
1735 1737 $ hg help -e -c commit > /dev/null
1736 1738 $ hg help -e commit
1737 1739 abort: no such help topic: commit
1738 1740 (try 'hg help --keyword commit')
1739 1741 [10]
1740 1742
1741 1743 Test keyword search help
1742 1744
1743 1745 $ cat > prefixedname.py <<EOF
1744 1746 > '''matched against word "clone"
1745 1747 > '''
1746 1748 > EOF
1747 1749 $ echo '[extensions]' >> $HGRCPATH
1748 1750 $ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
1749 1751 $ hg help -k clone
1750 1752 Topics:
1751 1753
1752 1754 config Configuration Files
1753 1755 extensions Using Additional Features
1754 1756 glossary Glossary
1755 1757 phases Working with Phases
1756 1758 subrepos Subrepositories
1757 1759 urls URL Paths
1758 1760
1759 1761 Commands:
1760 1762
1761 1763 bookmarks create a new bookmark or list existing bookmarks
1762 1764 clone make a copy of an existing repository
1763 1765 paths show aliases for remote repositories
1764 1766 pull pull changes from the specified source
1765 1767 update update working directory (or switch revisions)
1766 1768
1767 1769 Extensions:
1768 1770
1769 1771 clonebundles advertise pre-generated bundles to seed clones
1770 1772 narrow create clones which fetch history data for subset of files
1771 1773 (EXPERIMENTAL)
1772 1774 prefixedname matched against word "clone"
1773 1775 relink recreates hardlinks between repository clones
1774 1776
1775 1777 Extension Commands:
1776 1778
1777 1779 qclone clone main and patch repository at same time
1778 1780
1779 1781 Test unfound topic
1780 1782
1781 1783 $ hg help nonexistingtopicthatwillneverexisteverever
1782 1784 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1783 1785 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1784 1786 [10]
1785 1787
1786 1788 Test unfound keyword
1787 1789
1788 1790 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1789 1791 abort: no matches
1790 1792 (try 'hg help' for a list of topics)
1791 1793 [10]
1792 1794
1793 1795 Test omit indicating for help
1794 1796
1795 1797 $ cat > addverboseitems.py <<EOF
1796 1798 > r'''extension to test omit indicating.
1797 1799 >
1798 1800 > This paragraph is never omitted (for extension)
1799 1801 >
1800 1802 > .. container:: verbose
1801 1803 >
1802 1804 > This paragraph is omitted,
1803 1805 > if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
1804 1806 >
1805 1807 > This paragraph is never omitted, too (for extension)
1806 1808 > '''
1807 1809 > from mercurial import commands, help
1808 1810 > testtopic = br"""This paragraph is never omitted (for topic).
1809 1811 >
1810 1812 > .. container:: verbose
1811 1813 >
1812 1814 > This paragraph is omitted,
1813 1815 > if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
1814 1816 >
1815 1817 > This paragraph is never omitted, too (for topic)
1816 1818 > """
1817 1819 > def extsetup(ui):
1818 1820 > help.helptable.append(([b"topic-containing-verbose"],
1819 1821 > b"This is the topic to test omit indicating.",
1820 1822 > lambda ui: testtopic))
1821 1823 > EOF
1822 1824 $ echo '[extensions]' >> $HGRCPATH
1823 1825 $ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
1824 1826 $ hg help addverboseitems
1825 1827 addverboseitems extension - extension to test omit indicating.
1826 1828
1827 1829 This paragraph is never omitted (for extension)
1828 1830
1829 1831 This paragraph is never omitted, too (for extension)
1830 1832
1831 1833 (some details hidden, use --verbose to show complete help)
1832 1834
1833 1835 no commands defined
1834 1836 $ hg help -v addverboseitems
1835 1837 addverboseitems extension - extension to test omit indicating.
1836 1838
1837 1839 This paragraph is never omitted (for extension)
1838 1840
1839 1841 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1840 1842 extension)
1841 1843
1842 1844 This paragraph is never omitted, too (for extension)
1843 1845
1844 1846 no commands defined
1845 1847 $ hg help topic-containing-verbose
1846 1848 This is the topic to test omit indicating.
1847 1849 """"""""""""""""""""""""""""""""""""""""""
1848 1850
1849 1851 This paragraph is never omitted (for topic).
1850 1852
1851 1853 This paragraph is never omitted, too (for topic)
1852 1854
1853 1855 (some details hidden, use --verbose to show complete help)
1854 1856 $ hg help -v topic-containing-verbose
1855 1857 This is the topic to test omit indicating.
1856 1858 """"""""""""""""""""""""""""""""""""""""""
1857 1859
1858 1860 This paragraph is never omitted (for topic).
1859 1861
1860 1862 This paragraph is omitted, if 'hg help' is invoked without "-v" (for
1861 1863 topic)
1862 1864
1863 1865 This paragraph is never omitted, too (for topic)
1864 1866
1865 1867 Test section lookup
1866 1868
1867 1869 $ hg help revset.merge
1868 1870 "merge()"
1869 1871 Changeset is a merge changeset.
1870 1872
1871 1873 $ hg help glossary.dag
1872 1874 DAG
1873 1875 The repository of changesets of a distributed version control system
1874 1876 (DVCS) can be described as a directed acyclic graph (DAG), consisting
1875 1877 of nodes and edges, where nodes correspond to changesets and edges
1876 1878 imply a parent -> child relation. This graph can be visualized by
1877 1879 graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
1878 1880 limited by the requirement for children to have at most two parents.
1879 1881
1880 1882
1881 1883 $ hg help hgrc.paths
1882 1884 "paths"
1883 1885 -------
1884 1886
1885 1887 Assigns symbolic names and behavior to repositories.
1886 1888
1887 1889 Options are symbolic names defining the URL or directory that is the
1888 1890 location of the repository. Example:
1889 1891
1890 1892 [paths]
1891 1893 my_server = https://example.com/my_repo
1892 1894 local_path = /home/me/repo
1893 1895
1894 1896 These symbolic names can be used from the command line. To pull from
1895 1897 "my_server": 'hg pull my_server'. To push to "local_path": 'hg push
1896 1898 local_path'. You can check 'hg help urls' for details about valid URLs.
1897 1899
1898 1900 Options containing colons (":") denote sub-options that can influence
1899 1901 behavior for that specific path. Example:
1900 1902
1901 1903 [paths]
1902 1904 my_server = https://example.com/my_path
1903 1905 my_server:pushurl = ssh://example.com/my_path
1904 1906
1905 1907 Paths using the 'path://otherpath' scheme will inherit the sub-options
1906 1908 value from the path they point to.
1907 1909
1908 1910 The following sub-options can be defined:
1909 1911
1910 1912 "multi-urls"
1911 1913 A boolean option. When enabled the value of the '[paths]' entry will be
1912 1914 parsed as a list and the alias will resolve to multiple destination. If
1913 1915 some of the list entry use the 'path://' syntax, the suboption will be
1914 1916 inherited individually.
1915 1917
1916 1918 "pushurl"
1917 1919 The URL to use for push operations. If not defined, the location
1918 1920 defined by the path's main entry is used.
1919 1921
1920 1922 "pushrev"
1921 1923 A revset defining which revisions to push by default.
1922 1924
1923 1925 When 'hg push' is executed without a "-r" argument, the revset defined
1924 1926 by this sub-option is evaluated to determine what to push.
1925 1927
1926 1928 For example, a value of "." will push the working directory's revision
1927 1929 by default.
1928 1930
1929 1931 Revsets specifying bookmarks will not result in the bookmark being
1930 1932 pushed.
1931 1933
1932 1934 "bookmarks.mode"
1933 1935 How bookmark will be dealt during the exchange. It support the following
1934 1936 value
1935 1937
1936 1938 - "default": the default behavior, local and remote bookmarks are
1937 1939 "merged" on push/pull.
1938 1940 - "mirror": when pulling, replace local bookmarks by remote bookmarks.
1939 1941 This is useful to replicate a repository, or as an optimization.
1940 1942 - "ignore": ignore bookmarks during exchange. (This currently only
1941 1943 affect pulling)
1942 1944
1943 1945 The following special named paths exist:
1944 1946
1945 1947 "default"
1946 1948 The URL or directory to use when no source or remote is specified.
1947 1949
1948 1950 'hg clone' will automatically define this path to the location the
1949 1951 repository was cloned from.
1950 1952
1951 1953 "default-push"
1952 1954 (deprecated) The URL or directory for the default 'hg push' location.
1953 1955 "default:pushurl" should be used instead.
1954 1956
1955 1957 $ hg help glossary.mcguffin
1956 1958 abort: help section not found: glossary.mcguffin
1957 1959 [10]
1958 1960
1959 1961 $ hg help glossary.mc.guffin
1960 1962 abort: help section not found: glossary.mc.guffin
1961 1963 [10]
1962 1964
1963 1965 $ hg help template.files
1964 1966 files List of strings. All files modified, added, or removed by
1965 1967 this changeset.
1966 1968 files(pattern)
1967 1969 All files of the current changeset matching the pattern. See
1968 1970 'hg help patterns'.
1969 1971
1970 1972 Test section lookup by translated message
1971 1973
1972 1974 str.lower() instead of encoding.lower(str) on translated message might
1973 1975 make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
1974 1976 as the second or later byte of multi-byte character.
1975 1977
1976 1978 For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
1977 1979 contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
1978 1980 replacement makes message meaningless.
1979 1981
1980 1982 This tests that section lookup by translated string isn't broken by
1981 1983 such str.lower().
1982 1984
1983 1985 $ "$PYTHON" <<EOF
1984 1986 > def escape(s):
1985 1987 > return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932'))
1986 1988 > # translation of "record" in ja_JP.cp932
1987 1989 > upper = b"\x8bL\x98^"
1988 1990 > # str.lower()-ed section name should be treated as different one
1989 1991 > lower = b"\x8bl\x98^"
1990 1992 > with open('ambiguous.py', 'wb') as fp:
1991 1993 > fp.write(b"""# ambiguous section names in ja_JP.cp932
1992 1994 > u'''summary of extension
1993 1995 >
1994 1996 > %s
1995 1997 > ----
1996 1998 >
1997 1999 > Upper name should show only this message
1998 2000 >
1999 2001 > %s
2000 2002 > ----
2001 2003 >
2002 2004 > Lower name should show only this message
2003 2005 >
2004 2006 > subsequent section
2005 2007 > ------------------
2006 2008 >
2007 2009 > This should be hidden at 'hg help ambiguous' with section name.
2008 2010 > '''
2009 2011 > """ % (escape(upper), escape(lower)))
2010 2012 > EOF
2011 2013
2012 2014 $ cat >> $HGRCPATH <<EOF
2013 2015 > [extensions]
2014 2016 > ambiguous = ./ambiguous.py
2015 2017 > EOF
2016 2018
2017 2019 $ "$PYTHON" <<EOF | sh
2018 2020 > from mercurial.utils import procutil
2019 2021 > upper = b"\x8bL\x98^"
2020 2022 > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper)
2021 2023 > EOF
2022 2024 \x8bL\x98^ (esc)
2023 2025 ----
2024 2026
2025 2027 Upper name should show only this message
2026 2028
2027 2029
2028 2030 $ "$PYTHON" <<EOF | sh
2029 2031 > from mercurial.utils import procutil
2030 2032 > lower = b"\x8bl\x98^"
2031 2033 > procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower)
2032 2034 > EOF
2033 2035 \x8bl\x98^ (esc)
2034 2036 ----
2035 2037
2036 2038 Lower name should show only this message
2037 2039
2038 2040
2039 2041 $ cat >> $HGRCPATH <<EOF
2040 2042 > [extensions]
2041 2043 > ambiguous = !
2042 2044 > EOF
2043 2045
2044 2046 Show help content of disabled extensions
2045 2047
2046 2048 $ cat >> $HGRCPATH <<EOF
2047 2049 > [extensions]
2048 2050 > ambiguous = !./ambiguous.py
2049 2051 > EOF
2050 2052 $ hg help -e ambiguous
2051 2053 ambiguous extension - (no help text available)
2052 2054
2053 2055 (use 'hg help extensions' for information on enabling extensions)
2054 2056
2055 2057 Test dynamic list of merge tools only shows up once
2056 2058 $ hg help merge-tools
2057 2059 Merge Tools
2058 2060 """""""""""
2059 2061
2060 2062 To merge files Mercurial uses merge tools.
2061 2063
2062 2064 A merge tool combines two different versions of a file into a merged file.
2063 2065 Merge tools are given the two files and the greatest common ancestor of
2064 2066 the two file versions, so they can determine the changes made on both
2065 2067 branches.
2066 2068
2067 2069 Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
2068 2070 backout' and in several extensions.
2069 2071
2070 2072 Usually, the merge tool tries to automatically reconcile the files by
2071 2073 combining all non-overlapping changes that occurred separately in the two
2072 2074 different evolutions of the same initial base file. Furthermore, some
2073 2075 interactive merge programs make it easier to manually resolve conflicting
2074 2076 merges, either in a graphical way, or by inserting some conflict markers.
2075 2077 Mercurial does not include any interactive merge programs but relies on
2076 2078 external tools for that.
2077 2079
2078 2080 Available merge tools
2079 2081 =====================
2080 2082
2081 2083 External merge tools and their properties are configured in the merge-
2082 2084 tools configuration section - see hgrc(5) - but they can often just be
2083 2085 named by their executable.
2084 2086
2085 2087 A merge tool is generally usable if its executable can be found on the
2086 2088 system and if it can handle the merge. The executable is found if it is an
2087 2089 absolute or relative executable path or the name of an application in the
2088 2090 executable search path. The tool is assumed to be able to handle the merge
2089 2091 if it can handle symlinks if the file is a symlink, if it can handle
2090 2092 binary files if the file is binary, and if a GUI is available if the tool
2091 2093 requires a GUI.
2092 2094
2093 2095 There are some internal merge tools which can be used. The internal merge
2094 2096 tools are:
2095 2097
2096 2098 ":dump"
2097 2099 Creates three versions of the files to merge, containing the contents of
2098 2100 local, other and base. These files can then be used to perform a merge
2099 2101 manually. If the file to be merged is named "a.txt", these files will
2100 2102 accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
2101 2103 they will be placed in the same directory as "a.txt".
2102 2104
2103 2105 This implies premerge. Therefore, files aren't dumped, if premerge runs
2104 2106 successfully. Use :forcedump to forcibly write files out.
2105 2107
2106 2108 (actual capabilities: binary, symlink)
2107 2109
2108 2110 ":fail"
2109 2111 Rather than attempting to merge files that were modified on both
2110 2112 branches, it marks them as unresolved. The resolve command must be used
2111 2113 to resolve these conflicts.
2112 2114
2113 2115 (actual capabilities: binary, symlink)
2114 2116
2115 2117 ":forcedump"
2116 2118 Creates three versions of the files as same as :dump, but omits
2117 2119 premerge.
2118 2120
2119 2121 (actual capabilities: binary, symlink)
2120 2122
2121 2123 ":local"
2122 2124 Uses the local 'p1()' version of files as the merged version.
2123 2125
2124 2126 (actual capabilities: binary, symlink)
2125 2127
2126 2128 ":merge"
2127 2129 Uses the internal non-interactive simple merge algorithm for merging
2128 2130 files. It will fail if there are any conflicts and leave markers in the
2129 2131 partially merged file. Markers will have two sections, one for each side
2130 2132 of merge.
2131 2133
2132 2134 ":merge-local"
2133 2135 Like :merge, but resolve all conflicts non-interactively in favor of the
2134 2136 local 'p1()' changes.
2135 2137
2136 2138 ":merge-other"
2137 2139 Like :merge, but resolve all conflicts non-interactively in favor of the
2138 2140 other 'p2()' changes.
2139 2141
2140 2142 ":merge3"
2141 2143 Uses the internal non-interactive simple merge algorithm for merging
2142 2144 files. It will fail if there are any conflicts and leave markers in the
2143 2145 partially merged file. Marker will have three sections, one from each
2144 2146 side of the merge and one for the base content.
2145 2147
2146 2148 ":mergediff"
2147 2149 Uses the internal non-interactive simple merge algorithm for merging
2148 2150 files. It will fail if there are any conflicts and leave markers in the
2149 2151 partially merged file. The marker will have two sections, one with the
2150 2152 content from one side of the merge, and one with a diff from the base
2151 2153 content to the content on the other side. (experimental)
2152 2154
2153 2155 ":other"
2154 2156 Uses the other 'p2()' version of files as the merged version.
2155 2157
2156 2158 (actual capabilities: binary, symlink)
2157 2159
2158 2160 ":prompt"
2159 2161 Asks the user which of the local 'p1()' or the other 'p2()' version to
2160 2162 keep as the merged version.
2161 2163
2162 2164 (actual capabilities: binary, symlink)
2163 2165
2164 2166 ":tagmerge"
2165 2167 Uses the internal tag merge algorithm (experimental).
2166 2168
2167 2169 ":union"
2168 2170 Uses the internal non-interactive simple merge algorithm for merging
2169 2171 files. It will use both left and right sides for conflict regions. No
2170 2172 markers are inserted.
2171 2173
2172 2174 Internal tools are always available and do not require a GUI but will by
2173 2175 default not handle symlinks or binary files. See next section for detail
2174 2176 about "actual capabilities" described above.
2175 2177
2176 2178 Choosing a merge tool
2177 2179 =====================
2178 2180
2179 2181 Mercurial uses these rules when deciding which merge tool to use:
2180 2182
2181 2183 1. If a tool has been specified with the --tool option to merge or
2182 2184 resolve, it is used. If it is the name of a tool in the merge-tools
2183 2185 configuration, its configuration is used. Otherwise the specified tool
2184 2186 must be executable by the shell.
2185 2187 2. If the "HGMERGE" environment variable is present, its value is used and
2186 2188 must be executable by the shell.
2187 2189 3. If the filename of the file to be merged matches any of the patterns in
2188 2190 the merge-patterns configuration section, the first usable merge tool
2189 2191 corresponding to a matching pattern is used.
2190 2192 4. If ui.merge is set it will be considered next. If the value is not the
2191 2193 name of a configured tool, the specified value is used and must be
2192 2194 executable by the shell. Otherwise the named tool is used if it is
2193 2195 usable.
2194 2196 5. If any usable merge tools are present in the merge-tools configuration
2195 2197 section, the one with the highest priority is used.
2196 2198 6. If a program named "hgmerge" can be found on the system, it is used -
2197 2199 but it will by default not be used for symlinks and binary files.
2198 2200 7. If the file to be merged is not binary and is not a symlink, then
2199 2201 internal ":merge" is used.
2200 2202 8. Otherwise, ":prompt" is used.
2201 2203
2202 2204 For historical reason, Mercurial treats merge tools as below while
2203 2205 examining rules above.
2204 2206
2205 2207 step specified via binary symlink
2206 2208 ----------------------------------
2207 2209 1. --tool o/o o/o
2208 2210 2. HGMERGE o/o o/o
2209 2211 3. merge-patterns o/o(*) x/?(*)
2210 2212 4. ui.merge x/?(*) x/?(*)
2211 2213
2212 2214 Each capability column indicates Mercurial behavior for internal/external
2213 2215 merge tools at examining each rule.
2214 2216
2215 2217 - "o": "assume that a tool has capability"
2216 2218 - "x": "assume that a tool does not have capability"
2217 2219 - "?": "check actual capability of a tool"
2218 2220
2219 2221 If "merge.strict-capability-check" configuration is true, Mercurial checks
2220 2222 capabilities of merge tools strictly in (*) cases above (= each capability
2221 2223 column becomes "?/?"). It is false by default for backward compatibility.
2222 2224
2223 2225 Note:
2224 2226 After selecting a merge program, Mercurial will by default attempt to
2225 2227 merge the files using a simple merge algorithm first. Only if it
2226 2228 doesn't succeed because of conflicting changes will Mercurial actually
2227 2229 execute the merge program. Whether to use the simple merge algorithm
2228 2230 first can be controlled by the premerge setting of the merge tool.
2229 2231 Premerge is enabled by default unless the file is binary or a symlink.
2230 2232
2231 2233 See the merge-tools and ui sections of hgrc(5) for details on the
2232 2234 configuration of merge tools.
2233 2235
2234 2236 Compression engines listed in `hg help bundlespec`
2235 2237
2236 2238 $ hg help bundlespec | grep gzip
2237 2239 "v1" bundles can only use the "gzip", "bzip2", and "none" compression
2238 2240 An algorithm that produces smaller bundles than "gzip".
2239 2241 This engine will likely produce smaller bundles than "gzip" but will be
2240 2242 "gzip"
2241 2243 better compression than "gzip". It also frequently yields better (?)
2242 2244
2243 2245 Test usage of section marks in help documents
2244 2246
2245 2247 $ cd "$TESTDIR"/../doc
2246 2248 $ "$PYTHON" check-seclevel.py
2247 2249 $ cd $TESTTMP
2248 2250
2249 2251 #if serve
2250 2252
2251 2253 Test the help pages in hgweb.
2252 2254
2253 2255 Dish up an empty repo; serve it cold.
2254 2256
2255 2257 $ hg init "$TESTTMP/test"
2256 2258 $ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
2257 2259 $ cat hg.pid >> $DAEMON_PIDS
2258 2260
2259 2261 $ get-with-headers.py $LOCALIP:$HGPORT "help"
2260 2262 200 Script output follows
2261 2263
2262 2264 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2263 2265 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2264 2266 <head>
2265 2267 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2266 2268 <meta name="robots" content="index, nofollow" />
2267 2269 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2268 2270 <script type="text/javascript" src="/static/mercurial.js"></script>
2269 2271
2270 2272 <title>Help: Index</title>
2271 2273 </head>
2272 2274 <body>
2273 2275
2274 2276 <div class="container">
2275 2277 <div class="menu">
2276 2278 <div class="logo">
2277 2279 <a href="https://mercurial-scm.org/">
2278 2280 <img src="/static/hglogo.png" alt="mercurial" /></a>
2279 2281 </div>
2280 2282 <ul>
2281 2283 <li><a href="/shortlog">log</a></li>
2282 2284 <li><a href="/graph">graph</a></li>
2283 2285 <li><a href="/tags">tags</a></li>
2284 2286 <li><a href="/bookmarks">bookmarks</a></li>
2285 2287 <li><a href="/branches">branches</a></li>
2286 2288 </ul>
2287 2289 <ul>
2288 2290 <li class="active">help</li>
2289 2291 </ul>
2290 2292 </div>
2291 2293
2292 2294 <div class="main">
2293 2295 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2294 2296
2295 2297 <form class="search" action="/log">
2296 2298
2297 2299 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2298 2300 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2299 2301 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2300 2302 </form>
2301 2303 <table class="bigtable">
2302 2304 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
2303 2305
2304 2306 <tr><td>
2305 2307 <a href="/help/bundlespec">
2306 2308 bundlespec
2307 2309 </a>
2308 2310 </td><td>
2309 2311 Bundle File Formats
2310 2312 </td></tr>
2311 2313 <tr><td>
2312 2314 <a href="/help/color">
2313 2315 color
2314 2316 </a>
2315 2317 </td><td>
2316 2318 Colorizing Outputs
2317 2319 </td></tr>
2318 2320 <tr><td>
2319 2321 <a href="/help/config">
2320 2322 config
2321 2323 </a>
2322 2324 </td><td>
2323 2325 Configuration Files
2324 2326 </td></tr>
2325 2327 <tr><td>
2326 2328 <a href="/help/dates">
2327 2329 dates
2328 2330 </a>
2329 2331 </td><td>
2330 2332 Date Formats
2331 2333 </td></tr>
2332 2334 <tr><td>
2333 2335 <a href="/help/deprecated">
2334 2336 deprecated
2335 2337 </a>
2336 2338 </td><td>
2337 2339 Deprecated Features
2338 2340 </td></tr>
2339 2341 <tr><td>
2340 2342 <a href="/help/diffs">
2341 2343 diffs
2342 2344 </a>
2343 2345 </td><td>
2344 2346 Diff Formats
2345 2347 </td></tr>
2346 2348 <tr><td>
2347 2349 <a href="/help/environment">
2348 2350 environment
2349 2351 </a>
2350 2352 </td><td>
2351 2353 Environment Variables
2352 2354 </td></tr>
2353 2355 <tr><td>
2354 2356 <a href="/help/evolution">
2355 2357 evolution
2356 2358 </a>
2357 2359 </td><td>
2358 2360 Safely rewriting history (EXPERIMENTAL)
2359 2361 </td></tr>
2360 2362 <tr><td>
2361 2363 <a href="/help/extensions">
2362 2364 extensions
2363 2365 </a>
2364 2366 </td><td>
2365 2367 Using Additional Features
2366 2368 </td></tr>
2367 2369 <tr><td>
2368 2370 <a href="/help/filesets">
2369 2371 filesets
2370 2372 </a>
2371 2373 </td><td>
2372 2374 Specifying File Sets
2373 2375 </td></tr>
2374 2376 <tr><td>
2375 2377 <a href="/help/flags">
2376 2378 flags
2377 2379 </a>
2378 2380 </td><td>
2379 2381 Command-line flags
2380 2382 </td></tr>
2381 2383 <tr><td>
2382 2384 <a href="/help/glossary">
2383 2385 glossary
2384 2386 </a>
2385 2387 </td><td>
2386 2388 Glossary
2387 2389 </td></tr>
2388 2390 <tr><td>
2389 2391 <a href="/help/hgignore">
2390 2392 hgignore
2391 2393 </a>
2392 2394 </td><td>
2393 2395 Syntax for Mercurial Ignore Files
2394 2396 </td></tr>
2395 2397 <tr><td>
2396 2398 <a href="/help/hgweb">
2397 2399 hgweb
2398 2400 </a>
2399 2401 </td><td>
2400 2402 Configuring hgweb
2401 2403 </td></tr>
2402 2404 <tr><td>
2403 2405 <a href="/help/internals">
2404 2406 internals
2405 2407 </a>
2406 2408 </td><td>
2407 2409 Technical implementation topics
2408 2410 </td></tr>
2409 2411 <tr><td>
2410 2412 <a href="/help/merge-tools">
2411 2413 merge-tools
2412 2414 </a>
2413 2415 </td><td>
2414 2416 Merge Tools
2415 2417 </td></tr>
2416 2418 <tr><td>
2417 2419 <a href="/help/pager">
2418 2420 pager
2419 2421 </a>
2420 2422 </td><td>
2421 2423 Pager Support
2422 2424 </td></tr>
2423 2425 <tr><td>
2424 2426 <a href="/help/patterns">
2425 2427 patterns
2426 2428 </a>
2427 2429 </td><td>
2428 2430 File Name Patterns
2429 2431 </td></tr>
2430 2432 <tr><td>
2431 2433 <a href="/help/phases">
2432 2434 phases
2433 2435 </a>
2434 2436 </td><td>
2435 2437 Working with Phases
2436 2438 </td></tr>
2437 2439 <tr><td>
2438 2440 <a href="/help/revisions">
2439 2441 revisions
2440 2442 </a>
2441 2443 </td><td>
2442 2444 Specifying Revisions
2443 2445 </td></tr>
2444 2446 <tr><td>
2445 2447 <a href="/help/rust">
2446 2448 rust
2447 2449 </a>
2448 2450 </td><td>
2449 2451 Rust in Mercurial
2450 2452 </td></tr>
2451 2453 <tr><td>
2452 2454 <a href="/help/scripting">
2453 2455 scripting
2454 2456 </a>
2455 2457 </td><td>
2456 2458 Using Mercurial from scripts and automation
2457 2459 </td></tr>
2458 2460 <tr><td>
2459 2461 <a href="/help/subrepos">
2460 2462 subrepos
2461 2463 </a>
2462 2464 </td><td>
2463 2465 Subrepositories
2464 2466 </td></tr>
2465 2467 <tr><td>
2466 2468 <a href="/help/templating">
2467 2469 templating
2468 2470 </a>
2469 2471 </td><td>
2470 2472 Template Usage
2471 2473 </td></tr>
2472 2474 <tr><td>
2473 2475 <a href="/help/urls">
2474 2476 urls
2475 2477 </a>
2476 2478 </td><td>
2477 2479 URL Paths
2478 2480 </td></tr>
2479 2481 <tr><td>
2480 2482 <a href="/help/topic-containing-verbose">
2481 2483 topic-containing-verbose
2482 2484 </a>
2483 2485 </td><td>
2484 2486 This is the topic to test omit indicating.
2485 2487 </td></tr>
2486 2488
2487 2489
2488 2490 <tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
2489 2491
2490 2492 <tr><td>
2491 2493 <a href="/help/abort">
2492 2494 abort
2493 2495 </a>
2494 2496 </td><td>
2495 2497 abort an unfinished operation (EXPERIMENTAL)
2496 2498 </td></tr>
2497 2499 <tr><td>
2498 2500 <a href="/help/add">
2499 2501 add
2500 2502 </a>
2501 2503 </td><td>
2502 2504 add the specified files on the next commit
2503 2505 </td></tr>
2504 2506 <tr><td>
2505 2507 <a href="/help/annotate">
2506 2508 annotate
2507 2509 </a>
2508 2510 </td><td>
2509 2511 show changeset information by line for each file
2510 2512 </td></tr>
2511 2513 <tr><td>
2512 2514 <a href="/help/clone">
2513 2515 clone
2514 2516 </a>
2515 2517 </td><td>
2516 2518 make a copy of an existing repository
2517 2519 </td></tr>
2518 2520 <tr><td>
2519 2521 <a href="/help/commit">
2520 2522 commit
2521 2523 </a>
2522 2524 </td><td>
2523 2525 commit the specified files or all outstanding changes
2524 2526 </td></tr>
2525 2527 <tr><td>
2526 2528 <a href="/help/continue">
2527 2529 continue
2528 2530 </a>
2529 2531 </td><td>
2530 2532 resumes an interrupted operation (EXPERIMENTAL)
2531 2533 </td></tr>
2532 2534 <tr><td>
2533 2535 <a href="/help/diff">
2534 2536 diff
2535 2537 </a>
2536 2538 </td><td>
2537 2539 diff repository (or selected files)
2538 2540 </td></tr>
2539 2541 <tr><td>
2540 2542 <a href="/help/export">
2541 2543 export
2542 2544 </a>
2543 2545 </td><td>
2544 2546 dump the header and diffs for one or more changesets
2545 2547 </td></tr>
2546 2548 <tr><td>
2547 2549 <a href="/help/forget">
2548 2550 forget
2549 2551 </a>
2550 2552 </td><td>
2551 2553 forget the specified files on the next commit
2552 2554 </td></tr>
2553 2555 <tr><td>
2554 2556 <a href="/help/init">
2555 2557 init
2556 2558 </a>
2557 2559 </td><td>
2558 2560 create a new repository in the given directory
2559 2561 </td></tr>
2560 2562 <tr><td>
2561 2563 <a href="/help/log">
2562 2564 log
2563 2565 </a>
2564 2566 </td><td>
2565 2567 show revision history of entire repository or files
2566 2568 </td></tr>
2567 2569 <tr><td>
2568 2570 <a href="/help/merge">
2569 2571 merge
2570 2572 </a>
2571 2573 </td><td>
2572 2574 merge another revision into working directory
2573 2575 </td></tr>
2574 2576 <tr><td>
2575 2577 <a href="/help/pull">
2576 2578 pull
2577 2579 </a>
2578 2580 </td><td>
2579 2581 pull changes from the specified source
2580 2582 </td></tr>
2581 2583 <tr><td>
2582 2584 <a href="/help/push">
2583 2585 push
2584 2586 </a>
2585 2587 </td><td>
2586 2588 push changes to the specified destination
2587 2589 </td></tr>
2588 2590 <tr><td>
2589 2591 <a href="/help/remove">
2590 2592 remove
2591 2593 </a>
2592 2594 </td><td>
2593 2595 remove the specified files on the next commit
2594 2596 </td></tr>
2595 2597 <tr><td>
2596 2598 <a href="/help/serve">
2597 2599 serve
2598 2600 </a>
2599 2601 </td><td>
2600 2602 start stand-alone webserver
2601 2603 </td></tr>
2602 2604 <tr><td>
2603 2605 <a href="/help/status">
2604 2606 status
2605 2607 </a>
2606 2608 </td><td>
2607 2609 show changed files in the working directory
2608 2610 </td></tr>
2609 2611 <tr><td>
2610 2612 <a href="/help/summary">
2611 2613 summary
2612 2614 </a>
2613 2615 </td><td>
2614 2616 summarize working directory state
2615 2617 </td></tr>
2616 2618 <tr><td>
2617 2619 <a href="/help/update">
2618 2620 update
2619 2621 </a>
2620 2622 </td><td>
2621 2623 update working directory (or switch revisions)
2622 2624 </td></tr>
2623 2625
2624 2626
2625 2627
2626 2628 <tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
2627 2629
2628 2630 <tr><td>
2629 2631 <a href="/help/addremove">
2630 2632 addremove
2631 2633 </a>
2632 2634 </td><td>
2633 2635 add all new files, delete all missing files
2634 2636 </td></tr>
2635 2637 <tr><td>
2636 2638 <a href="/help/archive">
2637 2639 archive
2638 2640 </a>
2639 2641 </td><td>
2640 2642 create an unversioned archive of a repository revision
2641 2643 </td></tr>
2642 2644 <tr><td>
2643 2645 <a href="/help/backout">
2644 2646 backout
2645 2647 </a>
2646 2648 </td><td>
2647 2649 reverse effect of earlier changeset
2648 2650 </td></tr>
2649 2651 <tr><td>
2650 2652 <a href="/help/bisect">
2651 2653 bisect
2652 2654 </a>
2653 2655 </td><td>
2654 2656 subdivision search of changesets
2655 2657 </td></tr>
2656 2658 <tr><td>
2657 2659 <a href="/help/bookmarks">
2658 2660 bookmarks
2659 2661 </a>
2660 2662 </td><td>
2661 2663 create a new bookmark or list existing bookmarks
2662 2664 </td></tr>
2663 2665 <tr><td>
2664 2666 <a href="/help/branch">
2665 2667 branch
2666 2668 </a>
2667 2669 </td><td>
2668 2670 set or show the current branch name
2669 2671 </td></tr>
2670 2672 <tr><td>
2671 2673 <a href="/help/branches">
2672 2674 branches
2673 2675 </a>
2674 2676 </td><td>
2675 2677 list repository named branches
2676 2678 </td></tr>
2677 2679 <tr><td>
2678 2680 <a href="/help/bundle">
2679 2681 bundle
2680 2682 </a>
2681 2683 </td><td>
2682 2684 create a bundle file
2683 2685 </td></tr>
2684 2686 <tr><td>
2685 2687 <a href="/help/cat">
2686 2688 cat
2687 2689 </a>
2688 2690 </td><td>
2689 2691 output the current or given revision of files
2690 2692 </td></tr>
2691 2693 <tr><td>
2692 2694 <a href="/help/config">
2693 2695 config
2694 2696 </a>
2695 2697 </td><td>
2696 2698 show combined config settings from all hgrc files
2697 2699 </td></tr>
2698 2700 <tr><td>
2699 2701 <a href="/help/copy">
2700 2702 copy
2701 2703 </a>
2702 2704 </td><td>
2703 2705 mark files as copied for the next commit
2704 2706 </td></tr>
2705 2707 <tr><td>
2706 2708 <a href="/help/files">
2707 2709 files
2708 2710 </a>
2709 2711 </td><td>
2710 2712 list tracked files
2711 2713 </td></tr>
2712 2714 <tr><td>
2713 2715 <a href="/help/graft">
2714 2716 graft
2715 2717 </a>
2716 2718 </td><td>
2717 2719 copy changes from other branches onto the current branch
2718 2720 </td></tr>
2719 2721 <tr><td>
2720 2722 <a href="/help/grep">
2721 2723 grep
2722 2724 </a>
2723 2725 </td><td>
2724 2726 search for a pattern in specified files
2725 2727 </td></tr>
2726 2728 <tr><td>
2727 2729 <a href="/help/hashelp">
2728 2730 hashelp
2729 2731 </a>
2730 2732 </td><td>
2731 2733 Extension command's help
2732 2734 </td></tr>
2733 2735 <tr><td>
2734 2736 <a href="/help/heads">
2735 2737 heads
2736 2738 </a>
2737 2739 </td><td>
2738 2740 show branch heads
2739 2741 </td></tr>
2740 2742 <tr><td>
2741 2743 <a href="/help/help">
2742 2744 help
2743 2745 </a>
2744 2746 </td><td>
2745 2747 show help for a given topic or a help overview
2746 2748 </td></tr>
2747 2749 <tr><td>
2748 2750 <a href="/help/hgalias">
2749 2751 hgalias
2750 2752 </a>
2751 2753 </td><td>
2752 2754 My doc
2753 2755 </td></tr>
2754 2756 <tr><td>
2755 2757 <a href="/help/hgaliasnodoc">
2756 2758 hgaliasnodoc
2757 2759 </a>
2758 2760 </td><td>
2759 2761 summarize working directory state
2760 2762 </td></tr>
2761 2763 <tr><td>
2762 2764 <a href="/help/identify">
2763 2765 identify
2764 2766 </a>
2765 2767 </td><td>
2766 2768 identify the working directory or specified revision
2767 2769 </td></tr>
2768 2770 <tr><td>
2769 2771 <a href="/help/import">
2770 2772 import
2771 2773 </a>
2772 2774 </td><td>
2773 2775 import an ordered set of patches
2774 2776 </td></tr>
2775 2777 <tr><td>
2776 2778 <a href="/help/incoming">
2777 2779 incoming
2778 2780 </a>
2779 2781 </td><td>
2780 2782 show new changesets found in source
2781 2783 </td></tr>
2782 2784 <tr><td>
2783 2785 <a href="/help/manifest">
2784 2786 manifest
2785 2787 </a>
2786 2788 </td><td>
2787 2789 output the current or given revision of the project manifest
2788 2790 </td></tr>
2789 2791 <tr><td>
2790 2792 <a href="/help/nohelp">
2791 2793 nohelp
2792 2794 </a>
2793 2795 </td><td>
2794 2796 (no help text available)
2795 2797 </td></tr>
2796 2798 <tr><td>
2797 2799 <a href="/help/outgoing">
2798 2800 outgoing
2799 2801 </a>
2800 2802 </td><td>
2801 2803 show changesets not found in the destination
2802 2804 </td></tr>
2803 2805 <tr><td>
2804 2806 <a href="/help/paths">
2805 2807 paths
2806 2808 </a>
2807 2809 </td><td>
2808 2810 show aliases for remote repositories
2809 2811 </td></tr>
2810 2812 <tr><td>
2811 2813 <a href="/help/phase">
2812 2814 phase
2813 2815 </a>
2814 2816 </td><td>
2815 2817 set or show the current phase name
2816 2818 </td></tr>
2817 2819 <tr><td>
2818 2820 <a href="/help/purge">
2819 2821 purge
2820 2822 </a>
2821 2823 </td><td>
2822 2824 removes files not tracked by Mercurial
2823 2825 </td></tr>
2824 2826 <tr><td>
2825 2827 <a href="/help/recover">
2826 2828 recover
2827 2829 </a>
2828 2830 </td><td>
2829 2831 roll back an interrupted transaction
2830 2832 </td></tr>
2831 2833 <tr><td>
2832 2834 <a href="/help/rename">
2833 2835 rename
2834 2836 </a>
2835 2837 </td><td>
2836 2838 rename files; equivalent of copy + remove
2837 2839 </td></tr>
2838 2840 <tr><td>
2839 2841 <a href="/help/resolve">
2840 2842 resolve
2841 2843 </a>
2842 2844 </td><td>
2843 2845 redo merges or set/view the merge status of files
2844 2846 </td></tr>
2845 2847 <tr><td>
2846 2848 <a href="/help/revert">
2847 2849 revert
2848 2850 </a>
2849 2851 </td><td>
2850 2852 restore files to their checkout state
2851 2853 </td></tr>
2852 2854 <tr><td>
2853 2855 <a href="/help/root">
2854 2856 root
2855 2857 </a>
2856 2858 </td><td>
2857 2859 print the root (top) of the current working directory
2858 2860 </td></tr>
2859 2861 <tr><td>
2860 2862 <a href="/help/shellalias">
2861 2863 shellalias
2862 2864 </a>
2863 2865 </td><td>
2864 2866 (no help text available)
2865 2867 </td></tr>
2866 2868 <tr><td>
2867 2869 <a href="/help/shelve">
2868 2870 shelve
2869 2871 </a>
2870 2872 </td><td>
2871 2873 save and set aside changes from the working directory
2872 2874 </td></tr>
2873 2875 <tr><td>
2874 2876 <a href="/help/tag">
2875 2877 tag
2876 2878 </a>
2877 2879 </td><td>
2878 2880 add one or more tags for the current or given revision
2879 2881 </td></tr>
2880 2882 <tr><td>
2881 2883 <a href="/help/tags">
2882 2884 tags
2883 2885 </a>
2884 2886 </td><td>
2885 2887 list repository tags
2886 2888 </td></tr>
2887 2889 <tr><td>
2888 2890 <a href="/help/unbundle">
2889 2891 unbundle
2890 2892 </a>
2891 2893 </td><td>
2892 2894 apply one or more bundle files
2893 2895 </td></tr>
2894 2896 <tr><td>
2895 2897 <a href="/help/unshelve">
2896 2898 unshelve
2897 2899 </a>
2898 2900 </td><td>
2899 2901 restore a shelved change to the working directory
2900 2902 </td></tr>
2901 2903 <tr><td>
2902 2904 <a href="/help/verify">
2903 2905 verify
2904 2906 </a>
2905 2907 </td><td>
2906 2908 verify the integrity of the repository
2907 2909 </td></tr>
2908 2910 <tr><td>
2909 2911 <a href="/help/version">
2910 2912 version
2911 2913 </a>
2912 2914 </td><td>
2913 2915 output version and copyright information
2914 2916 </td></tr>
2915 2917
2916 2918
2917 2919 </table>
2918 2920 </div>
2919 2921 </div>
2920 2922
2921 2923
2922 2924
2923 2925 </body>
2924 2926 </html>
2925 2927
2926 2928
2927 2929 $ get-with-headers.py $LOCALIP:$HGPORT "help/add"
2928 2930 200 Script output follows
2929 2931
2930 2932 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2931 2933 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2932 2934 <head>
2933 2935 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2934 2936 <meta name="robots" content="index, nofollow" />
2935 2937 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2936 2938 <script type="text/javascript" src="/static/mercurial.js"></script>
2937 2939
2938 2940 <title>Help: add</title>
2939 2941 </head>
2940 2942 <body>
2941 2943
2942 2944 <div class="container">
2943 2945 <div class="menu">
2944 2946 <div class="logo">
2945 2947 <a href="https://mercurial-scm.org/">
2946 2948 <img src="/static/hglogo.png" alt="mercurial" /></a>
2947 2949 </div>
2948 2950 <ul>
2949 2951 <li><a href="/shortlog">log</a></li>
2950 2952 <li><a href="/graph">graph</a></li>
2951 2953 <li><a href="/tags">tags</a></li>
2952 2954 <li><a href="/bookmarks">bookmarks</a></li>
2953 2955 <li><a href="/branches">branches</a></li>
2954 2956 </ul>
2955 2957 <ul>
2956 2958 <li class="active"><a href="/help">help</a></li>
2957 2959 </ul>
2958 2960 </div>
2959 2961
2960 2962 <div class="main">
2961 2963 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2962 2964 <h3>Help: add</h3>
2963 2965
2964 2966 <form class="search" action="/log">
2965 2967
2966 2968 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
2967 2969 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2968 2970 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2969 2971 </form>
2970 2972 <div id="doc">
2971 2973 <p>
2972 2974 hg add [OPTION]... [FILE]...
2973 2975 </p>
2974 2976 <p>
2975 2977 add the specified files on the next commit
2976 2978 </p>
2977 2979 <p>
2978 2980 Schedule files to be version controlled and added to the
2979 2981 repository.
2980 2982 </p>
2981 2983 <p>
2982 2984 The files will be added to the repository at the next commit. To
2983 2985 undo an add before that, see 'hg forget'.
2984 2986 </p>
2985 2987 <p>
2986 2988 If no names are given, add all files to the repository (except
2987 2989 files matching &quot;.hgignore&quot;).
2988 2990 </p>
2989 2991 <p>
2990 2992 Examples:
2991 2993 </p>
2992 2994 <ul>
2993 2995 <li> New (unknown) files are added automatically by 'hg add':
2994 2996 <pre>
2995 2997 \$ ls (re)
2996 2998 foo.c
2997 2999 \$ hg status (re)
2998 3000 ? foo.c
2999 3001 \$ hg add (re)
3000 3002 adding foo.c
3001 3003 \$ hg status (re)
3002 3004 A foo.c
3003 3005 </pre>
3004 3006 <li> Specific files to be added can be specified:
3005 3007 <pre>
3006 3008 \$ ls (re)
3007 3009 bar.c foo.c
3008 3010 \$ hg status (re)
3009 3011 ? bar.c
3010 3012 ? foo.c
3011 3013 \$ hg add bar.c (re)
3012 3014 \$ hg status (re)
3013 3015 A bar.c
3014 3016 ? foo.c
3015 3017 </pre>
3016 3018 </ul>
3017 3019 <p>
3018 3020 Returns 0 if all files are successfully added.
3019 3021 </p>
3020 3022 <p>
3021 3023 options ([+] can be repeated):
3022 3024 </p>
3023 3025 <table>
3024 3026 <tr><td>-I</td>
3025 3027 <td>--include PATTERN [+]</td>
3026 3028 <td>include names matching the given patterns</td></tr>
3027 3029 <tr><td>-X</td>
3028 3030 <td>--exclude PATTERN [+]</td>
3029 3031 <td>exclude names matching the given patterns</td></tr>
3030 3032 <tr><td>-S</td>
3031 3033 <td>--subrepos</td>
3032 3034 <td>recurse into subrepositories</td></tr>
3033 3035 <tr><td>-n</td>
3034 3036 <td>--dry-run</td>
3035 3037 <td>do not perform actions, just print output</td></tr>
3036 3038 </table>
3037 3039 <p>
3038 3040 global options ([+] can be repeated):
3039 3041 </p>
3040 3042 <table>
3041 3043 <tr><td>-R</td>
3042 3044 <td>--repository REPO</td>
3043 3045 <td>repository root directory or name of overlay bundle file</td></tr>
3044 3046 <tr><td></td>
3045 3047 <td>--cwd DIR</td>
3046 3048 <td>change working directory</td></tr>
3047 3049 <tr><td>-y</td>
3048 3050 <td>--noninteractive</td>
3049 3051 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
3050 3052 <tr><td>-q</td>
3051 3053 <td>--quiet</td>
3052 3054 <td>suppress output</td></tr>
3053 3055 <tr><td>-v</td>
3054 3056 <td>--verbose</td>
3055 3057 <td>enable additional output</td></tr>
3056 3058 <tr><td></td>
3057 3059 <td>--color TYPE</td>
3058 3060 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
3059 3061 <tr><td></td>
3060 3062 <td>--config CONFIG [+]</td>
3061 3063 <td>set/override config option (use 'section.name=value')</td></tr>
3062 3064 <tr><td></td>
3063 3065 <td>--debug</td>
3064 3066 <td>enable debugging output</td></tr>
3065 3067 <tr><td></td>
3066 3068 <td>--debugger</td>
3067 3069 <td>start debugger</td></tr>
3068 3070 <tr><td></td>
3069 3071 <td>--encoding ENCODE</td>
3070 3072 <td>set the charset encoding (default: ascii)</td></tr>
3071 3073 <tr><td></td>
3072 3074 <td>--encodingmode MODE</td>
3073 3075 <td>set the charset encoding mode (default: strict)</td></tr>
3074 3076 <tr><td></td>
3075 3077 <td>--traceback</td>
3076 3078 <td>always print a traceback on exception</td></tr>
3077 3079 <tr><td></td>
3078 3080 <td>--time</td>
3079 3081 <td>time how long the command takes</td></tr>
3080 3082 <tr><td></td>
3081 3083 <td>--profile</td>
3082 3084 <td>print command execution profile</td></tr>
3083 3085 <tr><td></td>
3084 3086 <td>--version</td>
3085 3087 <td>output version information and exit</td></tr>
3086 3088 <tr><td>-h</td>
3087 3089 <td>--help</td>
3088 3090 <td>display help and exit</td></tr>
3089 3091 <tr><td></td>
3090 3092 <td>--hidden</td>
3091 3093 <td>consider hidden changesets</td></tr>
3092 3094 <tr><td></td>
3093 3095 <td>--pager TYPE</td>
3094 3096 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3095 3097 </table>
3096 3098
3097 3099 </div>
3098 3100 </div>
3099 3101 </div>
3100 3102
3101 3103
3102 3104
3103 3105 </body>
3104 3106 </html>
3105 3107
3106 3108
3107 3109 $ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
3108 3110 200 Script output follows
3109 3111
3110 3112 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3111 3113 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3112 3114 <head>
3113 3115 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3114 3116 <meta name="robots" content="index, nofollow" />
3115 3117 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3116 3118 <script type="text/javascript" src="/static/mercurial.js"></script>
3117 3119
3118 3120 <title>Help: remove</title>
3119 3121 </head>
3120 3122 <body>
3121 3123
3122 3124 <div class="container">
3123 3125 <div class="menu">
3124 3126 <div class="logo">
3125 3127 <a href="https://mercurial-scm.org/">
3126 3128 <img src="/static/hglogo.png" alt="mercurial" /></a>
3127 3129 </div>
3128 3130 <ul>
3129 3131 <li><a href="/shortlog">log</a></li>
3130 3132 <li><a href="/graph">graph</a></li>
3131 3133 <li><a href="/tags">tags</a></li>
3132 3134 <li><a href="/bookmarks">bookmarks</a></li>
3133 3135 <li><a href="/branches">branches</a></li>
3134 3136 </ul>
3135 3137 <ul>
3136 3138 <li class="active"><a href="/help">help</a></li>
3137 3139 </ul>
3138 3140 </div>
3139 3141
3140 3142 <div class="main">
3141 3143 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3142 3144 <h3>Help: remove</h3>
3143 3145
3144 3146 <form class="search" action="/log">
3145 3147
3146 3148 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3147 3149 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3148 3150 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3149 3151 </form>
3150 3152 <div id="doc">
3151 3153 <p>
3152 3154 hg remove [OPTION]... FILE...
3153 3155 </p>
3154 3156 <p>
3155 3157 aliases: rm
3156 3158 </p>
3157 3159 <p>
3158 3160 remove the specified files on the next commit
3159 3161 </p>
3160 3162 <p>
3161 3163 Schedule the indicated files for removal from the current branch.
3162 3164 </p>
3163 3165 <p>
3164 3166 This command schedules the files to be removed at the next commit.
3165 3167 To undo a remove before that, see 'hg revert'. To undo added
3166 3168 files, see 'hg forget'.
3167 3169 </p>
3168 3170 <p>
3169 3171 -A/--after can be used to remove only files that have already
3170 3172 been deleted, -f/--force can be used to force deletion, and -Af
3171 3173 can be used to remove files from the next revision without
3172 3174 deleting them from the working directory.
3173 3175 </p>
3174 3176 <p>
3175 3177 The following table details the behavior of remove for different
3176 3178 file states (columns) and option combinations (rows). The file
3177 3179 states are Added [A], Clean [C], Modified [M] and Missing [!]
3178 3180 (as reported by 'hg status'). The actions are Warn, Remove
3179 3181 (from branch) and Delete (from disk):
3180 3182 </p>
3181 3183 <table>
3182 3184 <tr><td>opt/state</td>
3183 3185 <td>A</td>
3184 3186 <td>C</td>
3185 3187 <td>M</td>
3186 3188 <td>!</td></tr>
3187 3189 <tr><td>none</td>
3188 3190 <td>W</td>
3189 3191 <td>RD</td>
3190 3192 <td>W</td>
3191 3193 <td>R</td></tr>
3192 3194 <tr><td>-f</td>
3193 3195 <td>R</td>
3194 3196 <td>RD</td>
3195 3197 <td>RD</td>
3196 3198 <td>R</td></tr>
3197 3199 <tr><td>-A</td>
3198 3200 <td>W</td>
3199 3201 <td>W</td>
3200 3202 <td>W</td>
3201 3203 <td>R</td></tr>
3202 3204 <tr><td>-Af</td>
3203 3205 <td>R</td>
3204 3206 <td>R</td>
3205 3207 <td>R</td>
3206 3208 <td>R</td></tr>
3207 3209 </table>
3208 3210 <p>
3209 3211 <b>Note:</b>
3210 3212 </p>
3211 3213 <p>
3212 3214 'hg remove' never deletes files in Added [A] state from the
3213 3215 working directory, not even if &quot;--force&quot; is specified.
3214 3216 </p>
3215 3217 <p>
3216 3218 Returns 0 on success, 1 if any warnings encountered.
3217 3219 </p>
3218 3220 <p>
3219 3221 options ([+] can be repeated):
3220 3222 </p>
3221 3223 <table>
3222 3224 <tr><td>-A</td>
3223 3225 <td>--after</td>
3224 3226 <td>record delete for missing files</td></tr>
3225 3227 <tr><td>-f</td>
3226 3228 <td>--force</td>
3227 3229 <td>forget added files, delete modified files</td></tr>
3228 3230 <tr><td>-S</td>
3229 3231 <td>--subrepos</td>
3230 3232 <td>recurse into subrepositories</td></tr>
3231 3233 <tr><td>-I</td>
3232 3234 <td>--include PATTERN [+]</td>
3233 3235 <td>include names matching the given patterns</td></tr>
3234 3236 <tr><td>-X</td>
3235 3237 <td>--exclude PATTERN [+]</td>
3236 3238 <td>exclude names matching the given patterns</td></tr>
3237 3239 <tr><td>-n</td>
3238 3240 <td>--dry-run</td>
3239 3241 <td>do not perform actions, just print output</td></tr>
3240 3242 </table>
3241 3243 <p>
3242 3244 global options ([+] can be repeated):
3243 3245 </p>
3244 3246 <table>
3245 3247 <tr><td>-R</td>
3246 3248 <td>--repository REPO</td>
3247 3249 <td>repository root directory or name of overlay bundle file</td></tr>
3248 3250 <tr><td></td>
3249 3251 <td>--cwd DIR</td>
3250 3252 <td>change working directory</td></tr>
3251 3253 <tr><td>-y</td>
3252 3254 <td>--noninteractive</td>
3253 3255 <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
3254 3256 <tr><td>-q</td>
3255 3257 <td>--quiet</td>
3256 3258 <td>suppress output</td></tr>
3257 3259 <tr><td>-v</td>
3258 3260 <td>--verbose</td>
3259 3261 <td>enable additional output</td></tr>
3260 3262 <tr><td></td>
3261 3263 <td>--color TYPE</td>
3262 3264 <td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
3263 3265 <tr><td></td>
3264 3266 <td>--config CONFIG [+]</td>
3265 3267 <td>set/override config option (use 'section.name=value')</td></tr>
3266 3268 <tr><td></td>
3267 3269 <td>--debug</td>
3268 3270 <td>enable debugging output</td></tr>
3269 3271 <tr><td></td>
3270 3272 <td>--debugger</td>
3271 3273 <td>start debugger</td></tr>
3272 3274 <tr><td></td>
3273 3275 <td>--encoding ENCODE</td>
3274 3276 <td>set the charset encoding (default: ascii)</td></tr>
3275 3277 <tr><td></td>
3276 3278 <td>--encodingmode MODE</td>
3277 3279 <td>set the charset encoding mode (default: strict)</td></tr>
3278 3280 <tr><td></td>
3279 3281 <td>--traceback</td>
3280 3282 <td>always print a traceback on exception</td></tr>
3281 3283 <tr><td></td>
3282 3284 <td>--time</td>
3283 3285 <td>time how long the command takes</td></tr>
3284 3286 <tr><td></td>
3285 3287 <td>--profile</td>
3286 3288 <td>print command execution profile</td></tr>
3287 3289 <tr><td></td>
3288 3290 <td>--version</td>
3289 3291 <td>output version information and exit</td></tr>
3290 3292 <tr><td>-h</td>
3291 3293 <td>--help</td>
3292 3294 <td>display help and exit</td></tr>
3293 3295 <tr><td></td>
3294 3296 <td>--hidden</td>
3295 3297 <td>consider hidden changesets</td></tr>
3296 3298 <tr><td></td>
3297 3299 <td>--pager TYPE</td>
3298 3300 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3299 3301 </table>
3300 3302
3301 3303 </div>
3302 3304 </div>
3303 3305 </div>
3304 3306
3305 3307
3306 3308
3307 3309 </body>
3308 3310 </html>
3309 3311
3310 3312
3311 3313 $ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
3312 3314 200 Script output follows
3313 3315
3314 3316 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3315 3317 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3316 3318 <head>
3317 3319 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3318 3320 <meta name="robots" content="index, nofollow" />
3319 3321 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3320 3322 <script type="text/javascript" src="/static/mercurial.js"></script>
3321 3323
3322 3324 <title>Help: dates</title>
3323 3325 </head>
3324 3326 <body>
3325 3327
3326 3328 <div class="container">
3327 3329 <div class="menu">
3328 3330 <div class="logo">
3329 3331 <a href="https://mercurial-scm.org/">
3330 3332 <img src="/static/hglogo.png" alt="mercurial" /></a>
3331 3333 </div>
3332 3334 <ul>
3333 3335 <li><a href="/shortlog">log</a></li>
3334 3336 <li><a href="/graph">graph</a></li>
3335 3337 <li><a href="/tags">tags</a></li>
3336 3338 <li><a href="/bookmarks">bookmarks</a></li>
3337 3339 <li><a href="/branches">branches</a></li>
3338 3340 </ul>
3339 3341 <ul>
3340 3342 <li class="active"><a href="/help">help</a></li>
3341 3343 </ul>
3342 3344 </div>
3343 3345
3344 3346 <div class="main">
3345 3347 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3346 3348 <h3>Help: dates</h3>
3347 3349
3348 3350 <form class="search" action="/log">
3349 3351
3350 3352 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3351 3353 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3352 3354 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3353 3355 </form>
3354 3356 <div id="doc">
3355 3357 <h1>Date Formats</h1>
3356 3358 <p>
3357 3359 Some commands allow the user to specify a date, e.g.:
3358 3360 </p>
3359 3361 <ul>
3360 3362 <li> backout, commit, import, tag: Specify the commit date.
3361 3363 <li> log, revert, update: Select revision(s) by date.
3362 3364 </ul>
3363 3365 <p>
3364 3366 Many date formats are valid. Here are some examples:
3365 3367 </p>
3366 3368 <ul>
3367 3369 <li> &quot;Wed Dec 6 13:18:29 2006&quot; (local timezone assumed)
3368 3370 <li> &quot;Dec 6 13:18 -0600&quot; (year assumed, time offset provided)
3369 3371 <li> &quot;Dec 6 13:18 UTC&quot; (UTC and GMT are aliases for +0000)
3370 3372 <li> &quot;Dec 6&quot; (midnight)
3371 3373 <li> &quot;13:18&quot; (today assumed)
3372 3374 <li> &quot;3:39&quot; (3:39AM assumed)
3373 3375 <li> &quot;3:39pm&quot; (15:39)
3374 3376 <li> &quot;2006-12-06 13:18:29&quot; (ISO 8601 format)
3375 3377 <li> &quot;2006-12-6 13:18&quot;
3376 3378 <li> &quot;2006-12-6&quot;
3377 3379 <li> &quot;12-6&quot;
3378 3380 <li> &quot;12/6&quot;
3379 3381 <li> &quot;12/6/6&quot; (Dec 6 2006)
3380 3382 <li> &quot;today&quot; (midnight)
3381 3383 <li> &quot;yesterday&quot; (midnight)
3382 3384 <li> &quot;now&quot; - right now
3383 3385 </ul>
3384 3386 <p>
3385 3387 Lastly, there is Mercurial's internal format:
3386 3388 </p>
3387 3389 <ul>
3388 3390 <li> &quot;1165411109 0&quot; (Wed Dec 6 13:18:29 2006 UTC)
3389 3391 </ul>
3390 3392 <p>
3391 3393 This is the internal representation format for dates. The first number
3392 3394 is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
3393 3395 second is the offset of the local timezone, in seconds west of UTC
3394 3396 (negative if the timezone is east of UTC).
3395 3397 </p>
3396 3398 <p>
3397 3399 The log command also accepts date ranges:
3398 3400 </p>
3399 3401 <ul>
3400 3402 <li> &quot;&lt;DATE&quot; - at or before a given date/time
3401 3403 <li> &quot;&gt;DATE&quot; - on or after a given date/time
3402 3404 <li> &quot;DATE to DATE&quot; - a date range, inclusive
3403 3405 <li> &quot;-DAYS&quot; - within a given number of days from today
3404 3406 </ul>
3405 3407
3406 3408 </div>
3407 3409 </div>
3408 3410 </div>
3409 3411
3410 3412
3411 3413
3412 3414 </body>
3413 3415 </html>
3414 3416
3415 3417
3416 3418 $ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
3417 3419 200 Script output follows
3418 3420
3419 3421 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3420 3422 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3421 3423 <head>
3422 3424 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3423 3425 <meta name="robots" content="index, nofollow" />
3424 3426 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3425 3427 <script type="text/javascript" src="/static/mercurial.js"></script>
3426 3428
3427 3429 <title>Help: pager</title>
3428 3430 </head>
3429 3431 <body>
3430 3432
3431 3433 <div class="container">
3432 3434 <div class="menu">
3433 3435 <div class="logo">
3434 3436 <a href="https://mercurial-scm.org/">
3435 3437 <img src="/static/hglogo.png" alt="mercurial" /></a>
3436 3438 </div>
3437 3439 <ul>
3438 3440 <li><a href="/shortlog">log</a></li>
3439 3441 <li><a href="/graph">graph</a></li>
3440 3442 <li><a href="/tags">tags</a></li>
3441 3443 <li><a href="/bookmarks">bookmarks</a></li>
3442 3444 <li><a href="/branches">branches</a></li>
3443 3445 </ul>
3444 3446 <ul>
3445 3447 <li class="active"><a href="/help">help</a></li>
3446 3448 </ul>
3447 3449 </div>
3448 3450
3449 3451 <div class="main">
3450 3452 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3451 3453 <h3>Help: pager</h3>
3452 3454
3453 3455 <form class="search" action="/log">
3454 3456
3455 3457 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3456 3458 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3457 3459 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3458 3460 </form>
3459 3461 <div id="doc">
3460 3462 <h1>Pager Support</h1>
3461 3463 <p>
3462 3464 Some Mercurial commands can produce a lot of output, and Mercurial will
3463 3465 attempt to use a pager to make those commands more pleasant.
3464 3466 </p>
3465 3467 <p>
3466 3468 To set the pager that should be used, set the application variable:
3467 3469 </p>
3468 3470 <pre>
3469 3471 [pager]
3470 3472 pager = less -FRX
3471 3473 </pre>
3472 3474 <p>
3473 3475 If no pager is set in the user or repository configuration, Mercurial uses the
3474 3476 environment variable $PAGER. If $PAGER is not set, pager.pager from the default
3475 3477 or system configuration is used. If none of these are set, a default pager will
3476 3478 be used, typically 'less' on Unix and 'more' on Windows.
3477 3479 </p>
3478 3480 <p>
3479 3481 You can disable the pager for certain commands by adding them to the
3480 3482 pager.ignore list:
3481 3483 </p>
3482 3484 <pre>
3483 3485 [pager]
3484 3486 ignore = version, help, update
3485 3487 </pre>
3486 3488 <p>
3487 3489 To ignore global commands like 'hg version' or 'hg help', you have
3488 3490 to specify them in your user configuration file.
3489 3491 </p>
3490 3492 <p>
3491 3493 To control whether the pager is used at all for an individual command,
3492 3494 you can use --pager=&lt;value&gt;:
3493 3495 </p>
3494 3496 <ul>
3495 3497 <li> use as needed: 'auto'.
3496 3498 <li> require the pager: 'yes' or 'on'.
3497 3499 <li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
3498 3500 </ul>
3499 3501 <p>
3500 3502 To globally turn off all attempts to use a pager, set:
3501 3503 </p>
3502 3504 <pre>
3503 3505 [ui]
3504 3506 paginate = never
3505 3507 </pre>
3506 3508 <p>
3507 3509 which will prevent the pager from running.
3508 3510 </p>
3509 3511
3510 3512 </div>
3511 3513 </div>
3512 3514 </div>
3513 3515
3514 3516
3515 3517
3516 3518 </body>
3517 3519 </html>
3518 3520
3519 3521
3520 3522 Sub-topic indexes rendered properly
3521 3523
3522 3524 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
3523 3525 200 Script output follows
3524 3526
3525 3527 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3526 3528 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3527 3529 <head>
3528 3530 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3529 3531 <meta name="robots" content="index, nofollow" />
3530 3532 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3531 3533 <script type="text/javascript" src="/static/mercurial.js"></script>
3532 3534
3533 3535 <title>Help: internals</title>
3534 3536 </head>
3535 3537 <body>
3536 3538
3537 3539 <div class="container">
3538 3540 <div class="menu">
3539 3541 <div class="logo">
3540 3542 <a href="https://mercurial-scm.org/">
3541 3543 <img src="/static/hglogo.png" alt="mercurial" /></a>
3542 3544 </div>
3543 3545 <ul>
3544 3546 <li><a href="/shortlog">log</a></li>
3545 3547 <li><a href="/graph">graph</a></li>
3546 3548 <li><a href="/tags">tags</a></li>
3547 3549 <li><a href="/bookmarks">bookmarks</a></li>
3548 3550 <li><a href="/branches">branches</a></li>
3549 3551 </ul>
3550 3552 <ul>
3551 3553 <li><a href="/help">help</a></li>
3552 3554 </ul>
3553 3555 </div>
3554 3556
3555 3557 <div class="main">
3556 3558 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3557 3559
3558 3560 <form class="search" action="/log">
3559 3561
3560 3562 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3561 3563 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3562 3564 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3563 3565 </form>
3564 3566 <table class="bigtable">
3565 3567 <tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
3566 3568
3567 3569 <tr><td>
3568 3570 <a href="/help/internals.bid-merge">
3569 3571 bid-merge
3570 3572 </a>
3571 3573 </td><td>
3572 3574 Bid Merge Algorithm
3573 3575 </td></tr>
3574 3576 <tr><td>
3575 3577 <a href="/help/internals.bundle2">
3576 3578 bundle2
3577 3579 </a>
3578 3580 </td><td>
3579 3581 Bundle2
3580 3582 </td></tr>
3581 3583 <tr><td>
3582 3584 <a href="/help/internals.bundles">
3583 3585 bundles
3584 3586 </a>
3585 3587 </td><td>
3586 3588 Bundles
3587 3589 </td></tr>
3588 3590 <tr><td>
3589 3591 <a href="/help/internals.cbor">
3590 3592 cbor
3591 3593 </a>
3592 3594 </td><td>
3593 3595 CBOR
3594 3596 </td></tr>
3595 3597 <tr><td>
3596 3598 <a href="/help/internals.censor">
3597 3599 censor
3598 3600 </a>
3599 3601 </td><td>
3600 3602 Censor
3601 3603 </td></tr>
3602 3604 <tr><td>
3603 3605 <a href="/help/internals.changegroups">
3604 3606 changegroups
3605 3607 </a>
3606 3608 </td><td>
3607 3609 Changegroups
3608 3610 </td></tr>
3609 3611 <tr><td>
3610 3612 <a href="/help/internals.config">
3611 3613 config
3612 3614 </a>
3613 3615 </td><td>
3614 3616 Config Registrar
3615 3617 </td></tr>
3616 3618 <tr><td>
3617 3619 <a href="/help/internals.dirstate-v2">
3618 3620 dirstate-v2
3619 3621 </a>
3620 3622 </td><td>
3621 3623 dirstate-v2 file format
3622 3624 </td></tr>
3623 3625 <tr><td>
3624 3626 <a href="/help/internals.extensions">
3625 3627 extensions
3626 3628 </a>
3627 3629 </td><td>
3628 3630 Extension API
3629 3631 </td></tr>
3630 3632 <tr><td>
3631 3633 <a href="/help/internals.mergestate">
3632 3634 mergestate
3633 3635 </a>
3634 3636 </td><td>
3635 3637 Mergestate
3636 3638 </td></tr>
3637 3639 <tr><td>
3638 3640 <a href="/help/internals.requirements">
3639 3641 requirements
3640 3642 </a>
3641 3643 </td><td>
3642 3644 Repository Requirements
3643 3645 </td></tr>
3644 3646 <tr><td>
3645 3647 <a href="/help/internals.revlogs">
3646 3648 revlogs
3647 3649 </a>
3648 3650 </td><td>
3649 3651 Revision Logs
3650 3652 </td></tr>
3651 3653 <tr><td>
3652 3654 <a href="/help/internals.wireprotocol">
3653 3655 wireprotocol
3654 3656 </a>
3655 3657 </td><td>
3656 3658 Wire Protocol
3657 3659 </td></tr>
3658 3660 <tr><td>
3659 3661 <a href="/help/internals.wireprotocolrpc">
3660 3662 wireprotocolrpc
3661 3663 </a>
3662 3664 </td><td>
3663 3665 Wire Protocol RPC
3664 3666 </td></tr>
3665 3667 <tr><td>
3666 3668 <a href="/help/internals.wireprotocolv2">
3667 3669 wireprotocolv2
3668 3670 </a>
3669 3671 </td><td>
3670 3672 Wire Protocol Version 2
3671 3673 </td></tr>
3672 3674
3673 3675
3674 3676
3675 3677
3676 3678
3677 3679 </table>
3678 3680 </div>
3679 3681 </div>
3680 3682
3681 3683
3682 3684
3683 3685 </body>
3684 3686 </html>
3685 3687
3686 3688
3687 3689 Sub-topic topics rendered properly
3688 3690
3689 3691 $ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
3690 3692 200 Script output follows
3691 3693
3692 3694 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3693 3695 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
3694 3696 <head>
3695 3697 <link rel="icon" href="/static/hgicon.png" type="image/png" />
3696 3698 <meta name="robots" content="index, nofollow" />
3697 3699 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
3698 3700 <script type="text/javascript" src="/static/mercurial.js"></script>
3699 3701
3700 3702 <title>Help: internals.changegroups</title>
3701 3703 </head>
3702 3704 <body>
3703 3705
3704 3706 <div class="container">
3705 3707 <div class="menu">
3706 3708 <div class="logo">
3707 3709 <a href="https://mercurial-scm.org/">
3708 3710 <img src="/static/hglogo.png" alt="mercurial" /></a>
3709 3711 </div>
3710 3712 <ul>
3711 3713 <li><a href="/shortlog">log</a></li>
3712 3714 <li><a href="/graph">graph</a></li>
3713 3715 <li><a href="/tags">tags</a></li>
3714 3716 <li><a href="/bookmarks">bookmarks</a></li>
3715 3717 <li><a href="/branches">branches</a></li>
3716 3718 </ul>
3717 3719 <ul>
3718 3720 <li class="active"><a href="/help">help</a></li>
3719 3721 </ul>
3720 3722 </div>
3721 3723
3722 3724 <div class="main">
3723 3725 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
3724 3726 <h3>Help: internals.changegroups</h3>
3725 3727
3726 3728 <form class="search" action="/log">
3727 3729
3728 3730 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
3729 3731 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
3730 3732 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
3731 3733 </form>
3732 3734 <div id="doc">
3733 3735 <h1>Changegroups</h1>
3734 3736 <p>
3735 3737 Changegroups are representations of repository revlog data, specifically
3736 3738 the changelog data, root/flat manifest data, treemanifest data, and
3737 3739 filelogs.
3738 3740 </p>
3739 3741 <p>
3740 3742 There are 4 versions of changegroups: &quot;1&quot;, &quot;2&quot;, &quot;3&quot; and &quot;4&quot;. From a
3741 3743 high-level, versions &quot;1&quot; and &quot;2&quot; are almost exactly the same, with the
3742 3744 only difference being an additional item in the *delta header*. Version
3743 3745 &quot;3&quot; adds support for storage flags in the *delta header* and optionally
3744 3746 exchanging treemanifests (enabled by setting an option on the
3745 3747 &quot;changegroup&quot; part in the bundle2). Version &quot;4&quot; adds support for exchanging
3746 3748 sidedata (additional revision metadata not part of the digest).
3747 3749 </p>
3748 3750 <p>
3749 3751 Changegroups when not exchanging treemanifests consist of 3 logical
3750 3752 segments:
3751 3753 </p>
3752 3754 <pre>
3753 3755 +---------------------------------+
3754 3756 | | | |
3755 3757 | changeset | manifest | filelogs |
3756 3758 | | | |
3757 3759 | | | |
3758 3760 +---------------------------------+
3759 3761 </pre>
3760 3762 <p>
3761 3763 When exchanging treemanifests, there are 4 logical segments:
3762 3764 </p>
3763 3765 <pre>
3764 3766 +-------------------------------------------------+
3765 3767 | | | | |
3766 3768 | changeset | root | treemanifests | filelogs |
3767 3769 | | manifest | | |
3768 3770 | | | | |
3769 3771 +-------------------------------------------------+
3770 3772 </pre>
3771 3773 <p>
3772 3774 The principle building block of each segment is a *chunk*. A *chunk*
3773 3775 is a framed piece of data:
3774 3776 </p>
3775 3777 <pre>
3776 3778 +---------------------------------------+
3777 3779 | | |
3778 3780 | length | data |
3779 3781 | (4 bytes) | (&lt;length - 4&gt; bytes) |
3780 3782 | | |
3781 3783 +---------------------------------------+
3782 3784 </pre>
3783 3785 <p>
3784 3786 All integers are big-endian signed integers. Each chunk starts with a 32-bit
3785 3787 integer indicating the length of the entire chunk (including the length field
3786 3788 itself).
3787 3789 </p>
3788 3790 <p>
3789 3791 There is a special case chunk that has a value of 0 for the length
3790 3792 (&quot;0x00000000&quot;). We call this an *empty chunk*.
3791 3793 </p>
3792 3794 <h2>Delta Groups</h2>
3793 3795 <p>
3794 3796 A *delta group* expresses the content of a revlog as a series of deltas,
3795 3797 or patches against previous revisions.
3796 3798 </p>
3797 3799 <p>
3798 3800 Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
3799 3801 to signal the end of the delta group:
3800 3802 </p>
3801 3803 <pre>
3802 3804 +------------------------------------------------------------------------+
3803 3805 | | | | | |
3804 3806 | chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
3805 3807 | (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
3806 3808 | | | | | |
3807 3809 +------------------------------------------------------------------------+
3808 3810 </pre>
3809 3811 <p>
3810 3812 Each *chunk*'s data consists of the following:
3811 3813 </p>
3812 3814 <pre>
3813 3815 +---------------------------------------+
3814 3816 | | |
3815 3817 | delta header | delta data |
3816 3818 | (various by version) | (various) |
3817 3819 | | |
3818 3820 +---------------------------------------+
3819 3821 </pre>
3820 3822 <p>
3821 3823 The *delta data* is a series of *delta*s that describe a diff from an existing
3822 3824 entry (either that the recipient already has, or previously specified in the
3823 3825 bundle/changegroup).
3824 3826 </p>
3825 3827 <p>
3826 3828 The *delta header* is different between versions &quot;1&quot;, &quot;2&quot;, &quot;3&quot; and &quot;4&quot;
3827 3829 of the changegroup format.
3828 3830 </p>
3829 3831 <p>
3830 3832 Version 1 (headerlen=80):
3831 3833 </p>
3832 3834 <pre>
3833 3835 +------------------------------------------------------+
3834 3836 | | | | |
3835 3837 | node | p1 node | p2 node | link node |
3836 3838 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3837 3839 | | | | |
3838 3840 +------------------------------------------------------+
3839 3841 </pre>
3840 3842 <p>
3841 3843 Version 2 (headerlen=100):
3842 3844 </p>
3843 3845 <pre>
3844 3846 +------------------------------------------------------------------+
3845 3847 | | | | | |
3846 3848 | node | p1 node | p2 node | base node | link node |
3847 3849 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
3848 3850 | | | | | |
3849 3851 +------------------------------------------------------------------+
3850 3852 </pre>
3851 3853 <p>
3852 3854 Version 3 (headerlen=102):
3853 3855 </p>
3854 3856 <pre>
3855 3857 +------------------------------------------------------------------------------+
3856 3858 | | | | | | |
3857 3859 | node | p1 node | p2 node | base node | link node | flags |
3858 3860 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
3859 3861 | | | | | | |
3860 3862 +------------------------------------------------------------------------------+
3861 3863 </pre>
3862 3864 <p>
3863 3865 Version 4 (headerlen=103):
3864 3866 </p>
3865 3867 <pre>
3866 3868 +------------------------------------------------------------------------------+----------+
3867 3869 | | | | | | | |
3868 3870 | node | p1 node | p2 node | base node | link node | flags | pflags |
3869 3871 | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) | (1 byte) |
3870 3872 | | | | | | | |
3871 3873 +------------------------------------------------------------------------------+----------+
3872 3874 </pre>
3873 3875 <p>
3874 3876 The *delta data* consists of &quot;chunklen - 4 - headerlen&quot; bytes, which contain a
3875 3877 series of *delta*s, densely packed (no separators). These deltas describe a diff
3876 3878 from an existing entry (either that the recipient already has, or previously
3877 3879 specified in the bundle/changegroup). The format is described more fully in
3878 3880 &quot;hg help internals.bdiff&quot;, but briefly:
3879 3881 </p>
3880 3882 <pre>
3881 3883 +---------------------------------------------------------------+
3882 3884 | | | | |
3883 3885 | start offset | end offset | new length | content |
3884 3886 | (4 bytes) | (4 bytes) | (4 bytes) | (&lt;new length&gt; bytes) |
3885 3887 | | | | |
3886 3888 +---------------------------------------------------------------+
3887 3889 </pre>
3888 3890 <p>
3889 3891 Please note that the length field in the delta data does *not* include itself.
3890 3892 </p>
3891 3893 <p>
3892 3894 In version 1, the delta is always applied against the previous node from
3893 3895 the changegroup or the first parent if this is the first entry in the
3894 3896 changegroup.
3895 3897 </p>
3896 3898 <p>
3897 3899 In version 2 and up, the delta base node is encoded in the entry in the
3898 3900 changegroup. This allows the delta to be expressed against any parent,
3899 3901 which can result in smaller deltas and more efficient encoding of data.
3900 3902 </p>
3901 3903 <p>
3902 3904 The *flags* field holds bitwise flags affecting the processing of revision
3903 3905 data. The following flags are defined:
3904 3906 </p>
3905 3907 <dl>
3906 3908 <dt>32768
3907 3909 <dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions.
3908 3910 <dt>16384
3909 3911 <dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents).
3910 3912 <dt>8192
3911 3913 <dd>Externally stored. The revision fulltext contains &quot;key:value&quot; &quot;\n&quot; delimited metadata defining an object stored elsewhere. Used by the LFS extension.
3912 3914 <dt>4096
3913 3915 <dd>Contains copy information. This revision changes files in a way that could affect copy tracing. This does *not* affect changegroup handling, but is relevant for other parts of Mercurial.
3914 3916 </dl>
3915 3917 <p>
3916 3918 For historical reasons, the integer values are identical to revlog version 1
3917 3919 per-revision storage flags and correspond to bits being set in this 2-byte
3918 3920 field. Bits were allocated starting from the most-significant bit, hence the
3919 3921 reverse ordering and allocation of these flags.
3920 3922 </p>
3921 3923 <p>
3922 3924 The *pflags* (protocol flags) field holds bitwise flags affecting the protocol
3923 3925 itself. They are first in the header since they may affect the handling of the
3924 3926 rest of the fields in a future version. They are defined as such:
3925 3927 </p>
3926 3928 <dl>
3927 3929 <dt>1 indicates whether to read a chunk of sidedata (of variable length) right
3928 3930 <dd>after the revision flags.
3929 3931 </dl>
3930 3932 <h2>Changeset Segment</h2>
3931 3933 <p>
3932 3934 The *changeset segment* consists of a single *delta group* holding
3933 3935 changelog data. The *empty chunk* at the end of the *delta group* denotes
3934 3936 the boundary to the *manifest segment*.
3935 3937 </p>
3936 3938 <h2>Manifest Segment</h2>
3937 3939 <p>
3938 3940 The *manifest segment* consists of a single *delta group* holding manifest
3939 3941 data. If treemanifests are in use, it contains only the manifest for the
3940 3942 root directory of the repository. Otherwise, it contains the entire
3941 3943 manifest data. The *empty chunk* at the end of the *delta group* denotes
3942 3944 the boundary to the next segment (either the *treemanifests segment* or the
3943 3945 *filelogs segment*, depending on version and the request options).
3944 3946 </p>
3945 3947 <h3>Treemanifests Segment</h3>
3946 3948 <p>
3947 3949 The *treemanifests segment* only exists in changegroup version &quot;3&quot; and &quot;4&quot;,
3948 3950 and only if the 'treemanifest' param is part of the bundle2 changegroup part
3949 3951 (it is not possible to use changegroup version 3 or 4 outside of bundle2).
3950 3952 Aside from the filenames in the *treemanifests segment* containing a
3951 3953 trailing &quot;/&quot; character, it behaves identically to the *filelogs segment*
3952 3954 (see below). The final sub-segment is followed by an *empty chunk* (logically,
3953 3955 a sub-segment with filename size 0). This denotes the boundary to the
3954 3956 *filelogs segment*.
3955 3957 </p>
3956 3958 <h2>Filelogs Segment</h2>
3957 3959 <p>
3958 3960 The *filelogs segment* consists of multiple sub-segments, each
3959 3961 corresponding to an individual file whose data is being described:
3960 3962 </p>
3961 3963 <pre>
3962 3964 +--------------------------------------------------+
3963 3965 | | | | | |
3964 3966 | filelog0 | filelog1 | filelog2 | ... | 0x0 |
3965 3967 | | | | | (4 bytes) |
3966 3968 | | | | | |
3967 3969 +--------------------------------------------------+
3968 3970 </pre>
3969 3971 <p>
3970 3972 The final filelog sub-segment is followed by an *empty chunk* (logically,
3971 3973 a sub-segment with filename size 0). This denotes the end of the segment
3972 3974 and of the overall changegroup.
3973 3975 </p>
3974 3976 <p>
3975 3977 Each filelog sub-segment consists of the following:
3976 3978 </p>
3977 3979 <pre>
3978 3980 +------------------------------------------------------+
3979 3981 | | | |
3980 3982 | filename length | filename | delta group |
3981 3983 | (4 bytes) | (&lt;length - 4&gt; bytes) | (various) |
3982 3984 | | | |
3983 3985 +------------------------------------------------------+
3984 3986 </pre>
3985 3987 <p>
3986 3988 That is, a *chunk* consisting of the filename (not terminated or padded)
3987 3989 followed by N chunks constituting the *delta group* for this file. The
3988 3990 *empty chunk* at the end of each *delta group* denotes the boundary to the
3989 3991 next filelog sub-segment.
3990 3992 </p>
3991 3993
3992 3994 </div>
3993 3995 </div>
3994 3996 </div>
3995 3997
3996 3998
3997 3999
3998 4000 </body>
3999 4001 </html>
4000 4002
4001 4003
4002 4004 $ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
4003 4005 404 Not Found
4004 4006
4005 4007 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4006 4008 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
4007 4009 <head>
4008 4010 <link rel="icon" href="/static/hgicon.png" type="image/png" />
4009 4011 <meta name="robots" content="index, nofollow" />
4010 4012 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
4011 4013 <script type="text/javascript" src="/static/mercurial.js"></script>
4012 4014
4013 4015 <title>test: error</title>
4014 4016 </head>
4015 4017 <body>
4016 4018
4017 4019 <div class="container">
4018 4020 <div class="menu">
4019 4021 <div class="logo">
4020 4022 <a href="https://mercurial-scm.org/">
4021 4023 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
4022 4024 </div>
4023 4025 <ul>
4024 4026 <li><a href="/shortlog">log</a></li>
4025 4027 <li><a href="/graph">graph</a></li>
4026 4028 <li><a href="/tags">tags</a></li>
4027 4029 <li><a href="/bookmarks">bookmarks</a></li>
4028 4030 <li><a href="/branches">branches</a></li>
4029 4031 </ul>
4030 4032 <ul>
4031 4033 <li><a href="/help">help</a></li>
4032 4034 </ul>
4033 4035 </div>
4034 4036
4035 4037 <div class="main">
4036 4038
4037 4039 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
4038 4040 <h3>error</h3>
4039 4041
4040 4042
4041 4043 <form class="search" action="/log">
4042 4044
4043 4045 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
4044 4046 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
4045 4047 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
4046 4048 </form>
4047 4049
4048 4050 <div class="description">
4049 4051 <p>
4050 4052 An error occurred while processing your request:
4051 4053 </p>
4052 4054 <p>
4053 4055 Not Found
4054 4056 </p>
4055 4057 </div>
4056 4058 </div>
4057 4059 </div>
4058 4060
4059 4061
4060 4062
4061 4063 </body>
4062 4064 </html>
4063 4065
4064 4066 [1]
4065 4067
4066 4068 $ killdaemons.py
4067 4069
4068 4070 #endif
@@ -1,2132 +1,2130 b''
1 1 #require no-reposimplestore
2 2
3 3 $ cat >> $HGRCPATH << EOF
4 4 > [extensions]
5 5 > share =
6 6 > [format]
7 7 > # stabilize test accross variant
8 8 > revlog-compression=zlib
9 9 > [storage]
10 10 > dirstate-v2.slow-path=allow
11 11 > EOF
12 12
13 13 store and revlogv1 are required in source
14 14
15 15 $ hg --config format.usestore=false init no-store
16 16 $ hg -R no-store debugupgraderepo
17 17 abort: cannot upgrade repository; requirement missing: store
18 18 [255]
19 19
20 20 $ hg init no-revlogv1
21 21 $ cat > no-revlogv1/.hg/requires << EOF
22 22 > dotencode
23 23 > fncache
24 24 > generaldelta
25 25 > store
26 26 > EOF
27 27
28 28 $ hg -R no-revlogv1 debugupgraderepo
29 29 abort: cannot upgrade repository; missing a revlog version
30 30 [255]
31 31
32 32 Cannot upgrade shared repositories
33 33
34 34 $ hg init share-parent
35 35 $ hg -R share-parent debugbuilddag -n .+9
36 36 $ hg -R share-parent up tip
37 37 10 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 38 $ hg -q share share-parent share-child
39 39
40 40 $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no
41 41 abort: cannot use these actions on a share repository: sparserevlog
42 42 (upgrade the main repository directly)
43 43 [255]
44 44
45 45 Unless the action is compatible with share
46 46
47 47 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet
48 48 requirements
49 49 preserved: * (glob)
50 50 added: dirstate-v2
51 51
52 52 no revlogs to process
53 53
54 54
55 55 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run
56 56 upgrade will perform the following actions:
57 57
58 58 requirements
59 59 preserved: * (glob)
60 60 added: dirstate-v2
61 61
62 62 no revlogs to process
63 63
64 64 $ hg debugformat -R share-child | grep dirstate-v2
65 65 dirstate-v2: yes
66 66 $ hg debugformat -R share-parent | grep dirstate-v2
67 67 dirstate-v2: no
68 68 $ hg status --all -R share-child
69 69 C nf0
70 70 C nf1
71 71 C nf2
72 72 C nf3
73 73 C nf4
74 74 C nf5
75 75 C nf6
76 76 C nf7
77 77 C nf8
78 78 C nf9
79 79 $ hg log -l 3 -R share-child
80 80 changeset: 9:0059eb38e4a4
81 81 tag: tip
82 82 user: debugbuilddag
83 83 date: Thu Jan 01 00:00:09 1970 +0000
84 84 summary: r9
85 85
86 86 changeset: 8:4d5be70c8130
87 87 user: debugbuilddag
88 88 date: Thu Jan 01 00:00:08 1970 +0000
89 89 summary: r8
90 90
91 91 changeset: 7:e60bfe72517e
92 92 user: debugbuilddag
93 93 date: Thu Jan 01 00:00:07 1970 +0000
94 94 summary: r7
95 95
96 96 $ hg status --all -R share-parent
97 97 C nf0
98 98 C nf1
99 99 C nf2
100 100 C nf3
101 101 C nf4
102 102 C nf5
103 103 C nf6
104 104 C nf7
105 105 C nf8
106 106 C nf9
107 107 $ hg log -l 3 -R share-parent
108 108 changeset: 9:0059eb38e4a4
109 109 tag: tip
110 110 user: debugbuilddag
111 111 date: Thu Jan 01 00:00:09 1970 +0000
112 112 summary: r9
113 113
114 114 changeset: 8:4d5be70c8130
115 115 user: debugbuilddag
116 116 date: Thu Jan 01 00:00:08 1970 +0000
117 117 summary: r8
118 118
119 119 changeset: 7:e60bfe72517e
120 120 user: debugbuilddag
121 121 date: Thu Jan 01 00:00:07 1970 +0000
122 122 summary: r7
123 123
124 124
125 125 $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run
126 126 upgrade will perform the following actions:
127 127
128 128 requirements
129 129 preserved: * (glob)
130 130 removed: dirstate-v2
131 131
132 132 no revlogs to process
133 133
134 134 $ hg debugformat -R share-child | grep dirstate-v2
135 135 dirstate-v2: no
136 136 $ hg debugformat -R share-parent | grep dirstate-v2
137 137 dirstate-v2: no
138 138 $ hg status --all -R share-child
139 139 C nf0
140 140 C nf1
141 141 C nf2
142 142 C nf3
143 143 C nf4
144 144 C nf5
145 145 C nf6
146 146 C nf7
147 147 C nf8
148 148 C nf9
149 149 $ hg log -l 3 -R share-child
150 150 changeset: 9:0059eb38e4a4
151 151 tag: tip
152 152 user: debugbuilddag
153 153 date: Thu Jan 01 00:00:09 1970 +0000
154 154 summary: r9
155 155
156 156 changeset: 8:4d5be70c8130
157 157 user: debugbuilddag
158 158 date: Thu Jan 01 00:00:08 1970 +0000
159 159 summary: r8
160 160
161 161 changeset: 7:e60bfe72517e
162 162 user: debugbuilddag
163 163 date: Thu Jan 01 00:00:07 1970 +0000
164 164 summary: r7
165 165
166 166 $ hg status --all -R share-parent
167 167 C nf0
168 168 C nf1
169 169 C nf2
170 170 C nf3
171 171 C nf4
172 172 C nf5
173 173 C nf6
174 174 C nf7
175 175 C nf8
176 176 C nf9
177 177 $ hg log -l 3 -R share-parent
178 178 changeset: 9:0059eb38e4a4
179 179 tag: tip
180 180 user: debugbuilddag
181 181 date: Thu Jan 01 00:00:09 1970 +0000
182 182 summary: r9
183 183
184 184 changeset: 8:4d5be70c8130
185 185 user: debugbuilddag
186 186 date: Thu Jan 01 00:00:08 1970 +0000
187 187 summary: r8
188 188
189 189 changeset: 7:e60bfe72517e
190 190 user: debugbuilddag
191 191 date: Thu Jan 01 00:00:07 1970 +0000
192 192 summary: r7
193 193
194 194
195 195 Do not yet support upgrading treemanifest repos
196 196
197 197 $ hg --config experimental.treemanifest=true init treemanifest
198 198 $ hg -R treemanifest debugupgraderepo
199 199 abort: cannot upgrade repository; unsupported source requirement: treemanifest
200 200 [255]
201 201
202 202 Cannot add treemanifest requirement during upgrade
203 203
204 204 $ hg init disallowaddedreq
205 205 $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo
206 206 abort: cannot upgrade repository; do not support adding requirement: treemanifest
207 207 [255]
208 208
209 209 An upgrade of a repository created with recommended settings only suggests optimizations
210 210
211 211 $ hg init empty
212 212 $ cd empty
213 213 $ hg debugformat
214 214 format-variant repo
215 215 fncache: yes
216 216 dirstate-v2: no
217 217 tracked-hint: no
218 218 dotencode: yes
219 219 generaldelta: yes
220 220 share-safe: yes
221 221 sparserevlog: yes
222 222 persistent-nodemap: no (no-rust !)
223 223 persistent-nodemap: yes (rust !)
224 224 copies-sdc: no
225 225 revlog-v2: no
226 226 changelog-v2: no
227 227 plain-cl-delta: yes
228 228 compression: zlib
229 229 compression-level: default
230 230 $ hg debugformat --verbose
231 231 format-variant repo config default
232 232 fncache: yes yes yes
233 233 dirstate-v2: no no no
234 234 tracked-hint: no no no
235 235 dotencode: yes yes yes
236 236 generaldelta: yes yes yes
237 237 share-safe: yes yes yes
238 238 sparserevlog: yes yes yes
239 239 persistent-nodemap: no no no (no-rust !)
240 240 persistent-nodemap: yes yes no (rust !)
241 241 copies-sdc: no no no
242 242 revlog-v2: no no no
243 243 changelog-v2: no no no
244 244 plain-cl-delta: yes yes yes
245 245 compression: zlib zlib zlib (no-zstd !)
246 246 compression: zlib zlib zstd (zstd !)
247 247 compression-level: default default default
248 248 $ hg debugformat --verbose --config format.usefncache=no
249 249 format-variant repo config default
250 250 fncache: yes no yes
251 251 dirstate-v2: no no no
252 252 tracked-hint: no no no
253 253 dotencode: yes no yes
254 254 generaldelta: yes yes yes
255 255 share-safe: yes yes yes
256 256 sparserevlog: yes yes yes
257 257 persistent-nodemap: no no no (no-rust !)
258 258 persistent-nodemap: yes yes no (rust !)
259 259 copies-sdc: no no no
260 260 revlog-v2: no no no
261 261 changelog-v2: no no no
262 262 plain-cl-delta: yes yes yes
263 263 compression: zlib zlib zlib (no-zstd !)
264 264 compression: zlib zlib zstd (zstd !)
265 265 compression-level: default default default
266 266 $ hg debugformat --verbose --config format.usefncache=no --color=debug
267 267 format-variant repo config default
268 268 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
269 269 [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
270 270 [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
271 271 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
272 272 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
273 273 [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
274 274 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
275 275 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
276 276 [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
277 277 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
278 278 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
279 279 [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
280 280 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
281 281 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
282 282 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
283 283 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
284 284 $ hg debugformat -Tjson
285 285 [
286 286 {
287 287 "config": true,
288 288 "default": true,
289 289 "name": "fncache",
290 290 "repo": true
291 291 },
292 292 {
293 293 "config": false,
294 294 "default": false,
295 295 "name": "dirstate-v2",
296 296 "repo": false
297 297 },
298 298 {
299 299 "config": false,
300 300 "default": false,
301 301 "name": "tracked-hint",
302 302 "repo": false
303 303 },
304 304 {
305 305 "config": true,
306 306 "default": true,
307 307 "name": "dotencode",
308 308 "repo": true
309 309 },
310 310 {
311 311 "config": true,
312 312 "default": true,
313 313 "name": "generaldelta",
314 314 "repo": true
315 315 },
316 316 {
317 317 "config": true,
318 318 "default": true,
319 319 "name": "share-safe",
320 320 "repo": true
321 321 },
322 322 {
323 323 "config": true,
324 324 "default": true,
325 325 "name": "sparserevlog",
326 326 "repo": true
327 327 },
328 328 {
329 329 "config": false, (no-rust !)
330 330 "config": true, (rust !)
331 331 "default": false,
332 332 "name": "persistent-nodemap",
333 333 "repo": false (no-rust !)
334 334 "repo": true (rust !)
335 335 },
336 336 {
337 337 "config": false,
338 338 "default": false,
339 339 "name": "copies-sdc",
340 340 "repo": false
341 341 },
342 342 {
343 343 "config": false,
344 344 "default": false,
345 345 "name": "revlog-v2",
346 346 "repo": false
347 347 },
348 348 {
349 349 "config": false,
350 350 "default": false,
351 351 "name": "changelog-v2",
352 352 "repo": false
353 353 },
354 354 {
355 355 "config": true,
356 356 "default": true,
357 357 "name": "plain-cl-delta",
358 358 "repo": true
359 359 },
360 360 {
361 361 "config": "zlib",
362 362 "default": "zlib", (no-zstd !)
363 363 "default": "zstd", (zstd !)
364 364 "name": "compression",
365 365 "repo": "zlib"
366 366 },
367 367 {
368 368 "config": "default",
369 369 "default": "default",
370 370 "name": "compression-level",
371 371 "repo": "default"
372 372 }
373 373 ]
374 374 $ hg debugupgraderepo
375 375 (no format upgrades found in existing repository)
376 376 performing an upgrade with "--run" will make the following changes:
377 377
378 378 requirements
379 379 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
380 380 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
381 381
382 382 no revlogs to process
383 383
384 384 additional optimizations are available by specifying "--optimize <name>":
385 385
386 386 re-delta-parent
387 387 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
388 388
389 389 re-delta-multibase
390 390 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
391 391
392 392 re-delta-all
393 393 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
394 394
395 395 re-delta-fulladd
396 396 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
397 397
398 398
399 399 $ hg debugupgraderepo --quiet
400 400 requirements
401 401 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
402 402 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
403 403
404 404 no revlogs to process
405 405
406 406
407 407 --optimize can be used to add optimizations
408 408
409 409 $ hg debugupgrade --optimize 're-delta-parent'
410 410 (no format upgrades found in existing repository)
411 411 performing an upgrade with "--run" will make the following changes:
412 412
413 413 requirements
414 414 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
415 415 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
416 416
417 417 optimisations: re-delta-parent
418 418
419 419 re-delta-parent
420 420 deltas within internal storage will choose a new base revision if needed
421 421
422 422 processed revlogs:
423 423 - all-filelogs
424 424 - changelog
425 425 - manifest
426 426
427 427 additional optimizations are available by specifying "--optimize <name>":
428 428
429 429 re-delta-multibase
430 430 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
431 431
432 432 re-delta-all
433 433 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
434 434
435 435 re-delta-fulladd
436 436 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
437 437
438 438
439 439 modern form of the option
440 440
441 441 $ hg debugupgrade --optimize re-delta-parent
442 442 (no format upgrades found in existing repository)
443 443 performing an upgrade with "--run" will make the following changes:
444 444
445 445 requirements
446 446 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
447 447 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
448 448
449 449 optimisations: re-delta-parent
450 450
451 451 re-delta-parent
452 452 deltas within internal storage will choose a new base revision if needed
453 453
454 454 processed revlogs:
455 455 - all-filelogs
456 456 - changelog
457 457 - manifest
458 458
459 459 additional optimizations are available by specifying "--optimize <name>":
460 460
461 461 re-delta-multibase
462 462 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
463 463
464 464 re-delta-all
465 465 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
466 466
467 467 re-delta-fulladd
468 468 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
469 469
470 470 $ hg debugupgrade --optimize re-delta-parent --quiet
471 471 requirements
472 472 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
473 473 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
474 474
475 475 optimisations: re-delta-parent
476 476
477 477 processed revlogs:
478 478 - all-filelogs
479 479 - changelog
480 480 - manifest
481 481
482 482
483 483 unknown optimization:
484 484
485 485 $ hg debugupgrade --optimize foobar
486 486 abort: unknown optimization action requested: foobar
487 487 (run without arguments to see valid optimizations)
488 488 [255]
489 489
490 490 Various sub-optimal detections work
491 491
492 492 $ cat > .hg/requires << EOF
493 493 > revlogv1
494 494 > store
495 495 > EOF
496 496
497 497 $ hg debugformat
498 498 format-variant repo
499 499 fncache: no
500 500 dirstate-v2: no
501 501 tracked-hint: no
502 502 dotencode: no
503 503 generaldelta: no
504 504 share-safe: no
505 505 sparserevlog: no
506 506 persistent-nodemap: no
507 507 copies-sdc: no
508 508 revlog-v2: no
509 509 changelog-v2: no
510 510 plain-cl-delta: yes
511 511 compression: zlib
512 512 compression-level: default
513 513 $ hg debugformat --verbose
514 514 format-variant repo config default
515 515 fncache: no yes yes
516 516 dirstate-v2: no no no
517 517 tracked-hint: no no no
518 518 dotencode: no yes yes
519 519 generaldelta: no yes yes
520 520 share-safe: no yes yes
521 521 sparserevlog: no yes yes
522 522 persistent-nodemap: no no no (no-rust !)
523 523 persistent-nodemap: no yes no (rust !)
524 524 copies-sdc: no no no
525 525 revlog-v2: no no no
526 526 changelog-v2: no no no
527 527 plain-cl-delta: yes yes yes
528 528 compression: zlib zlib zlib (no-zstd !)
529 529 compression: zlib zlib zstd (zstd !)
530 530 compression-level: default default default
531 531 $ hg debugformat --verbose --config format.usegeneraldelta=no
532 532 format-variant repo config default
533 533 fncache: no yes yes
534 534 dirstate-v2: no no no
535 535 tracked-hint: no no no
536 536 dotencode: no yes yes
537 537 generaldelta: no no yes
538 538 share-safe: no yes yes
539 539 sparserevlog: no no yes
540 540 persistent-nodemap: no no no (no-rust !)
541 541 persistent-nodemap: no yes no (rust !)
542 542 copies-sdc: no no no
543 543 revlog-v2: no no no
544 544 changelog-v2: no no no
545 545 plain-cl-delta: yes yes yes
546 546 compression: zlib zlib zlib (no-zstd !)
547 547 compression: zlib zlib zstd (zstd !)
548 548 compression-level: default default default
549 549 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
550 550 format-variant repo config default
551 551 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
552 552 [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
553 553 [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
554 554 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
555 555 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
556 556 [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
557 557 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
558 558 [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !)
559 559 [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !)
560 560 [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
561 561 [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
562 562 [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no]
563 563 [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
564 564 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !)
565 565 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
566 566 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
567 567 $ hg debugupgraderepo
568 568 note: selecting all-filelogs for processing to change: dotencode
569 569 note: selecting all-manifestlogs for processing to change: dotencode
570 570 note: selecting changelog for processing to change: dotencode
571 571
572 572 repository lacks features recommended by current config options:
573 573
574 574 fncache
575 575 long and reserved filenames may not work correctly; repository performance is sub-optimal
576 576
577 577 dotencode
578 578 storage of filenames beginning with a period or space may not work correctly
579 579
580 580 generaldelta
581 581 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
582 582
583 583 share-safe
584 584 old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled.
585 585
586 586 sparserevlog
587 587 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
588 588
589 589 persistent-nodemap (rust !)
590 590 persist the node -> rev mapping on disk to speedup lookup (rust !)
591 591 (rust !)
592 592
593 593 performing an upgrade with "--run" will make the following changes:
594 594
595 595 requirements
596 596 preserved: revlogv1, store
597 597 added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !)
598 598 added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
599 599
600 600 fncache
601 601 repository will be more resilient to storing certain paths and performance of certain operations should be improved
602 602
603 603 dotencode
604 604 repository will be better able to store files beginning with a space or period
605 605
606 606 generaldelta
607 607 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
608 608
609 609 share-safe
610 610 Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs.
611 611
612 612 sparserevlog
613 613 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
614 614
615 615 persistent-nodemap (rust !)
616 616 Speedup revision lookup by node id. (rust !)
617 617 (rust !)
618 618 processed revlogs:
619 619 - all-filelogs
620 620 - changelog
621 621 - manifest
622 622
623 623 additional optimizations are available by specifying "--optimize <name>":
624 624
625 625 re-delta-parent
626 626 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
627 627
628 628 re-delta-multibase
629 629 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
630 630
631 631 re-delta-all
632 632 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
633 633
634 634 re-delta-fulladd
635 635 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
636 636
637 637 $ hg debugupgraderepo --quiet
638 638 requirements
639 639 preserved: revlogv1, store
640 640 added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !)
641 641 added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
642 642
643 643 processed revlogs:
644 644 - all-filelogs
645 645 - changelog
646 646 - manifest
647 647
648 648
649 649 $ hg --config format.dotencode=false debugupgraderepo
650 650 note: selecting all-filelogs for processing to change: fncache
651 651 note: selecting all-manifestlogs for processing to change: fncache
652 652 note: selecting changelog for processing to change: fncache
653 653
654 654 repository lacks features recommended by current config options:
655 655
656 656 fncache
657 657 long and reserved filenames may not work correctly; repository performance is sub-optimal
658 658
659 659 generaldelta
660 660 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
661 661
662 662 share-safe
663 663 old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled.
664 664
665 665 sparserevlog
666 666 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
667 667
668 668 persistent-nodemap (rust !)
669 669 persist the node -> rev mapping on disk to speedup lookup (rust !)
670 670 (rust !)
671 671 repository lacks features used by the default config options:
672 672
673 673 dotencode
674 674 storage of filenames beginning with a period or space may not work correctly
675 675
676 676
677 677 performing an upgrade with "--run" will make the following changes:
678 678
679 679 requirements
680 680 preserved: revlogv1, store
681 681 added: fncache, generaldelta, share-safe, sparserevlog (no-rust !)
682 682 added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !)
683 683
684 684 fncache
685 685 repository will be more resilient to storing certain paths and performance of certain operations should be improved
686 686
687 687 generaldelta
688 688 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
689 689
690 690 share-safe
691 691 Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs.
692 692
693 693 sparserevlog
694 694 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
695 695
696 696 persistent-nodemap (rust !)
697 697 Speedup revision lookup by node id. (rust !)
698 698 (rust !)
699 699 processed revlogs:
700 700 - all-filelogs
701 701 - changelog
702 702 - manifest
703 703
704 704 additional optimizations are available by specifying "--optimize <name>":
705 705
706 706 re-delta-parent
707 707 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
708 708
709 709 re-delta-multibase
710 710 deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
711 711
712 712 re-delta-all
713 713 deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
714 714
715 715 re-delta-fulladd
716 716 every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
717 717
718 718
719 719 $ cd ..
720 720
721 721 Upgrading a repository that is already modern essentially no-ops
722 722
723 723 $ hg init modern
724 724 $ hg -R modern debugupgraderepo --run
725 725 nothing to do
726 726
727 727 Upgrading a repository to generaldelta works
728 728
729 729 $ hg --config format.usegeneraldelta=false init upgradegd
730 730 $ cd upgradegd
731 731 $ touch f0
732 732 $ hg -q commit -A -m initial
733 733 $ mkdir FooBarDirectory.d
734 734 $ touch FooBarDirectory.d/f1
735 735 $ hg -q commit -A -m 'add f1'
736 736 $ hg -q up -r 0
737 737 >>> import random
738 738 >>> random.seed(0) # have a reproducible content
739 739 >>> with open("f2", "wb") as f:
740 740 ... for i in range(100000):
741 741 ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None
742 742 $ hg -q commit -A -m 'add f2'
743 743
744 744 make sure we have a .d file
745 745
746 746 $ ls -d .hg/store/data/*
747 747 .hg/store/data/_foo_bar_directory.d.hg
748 748 .hg/store/data/f0.i
749 749 .hg/store/data/f2.d
750 750 .hg/store/data/f2.i
751 751
752 752 $ hg debugupgraderepo --run --config format.sparse-revlog=false
753 753 note: selecting all-filelogs for processing to change: generaldelta
754 754 note: selecting all-manifestlogs for processing to change: generaldelta
755 755 note: selecting changelog for processing to change: generaldelta
756 756
757 757 upgrade will perform the following actions:
758 758
759 759 requirements
760 760 preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !)
761 761 preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !)
762 762 added: generaldelta
763 763
764 764 generaldelta
765 765 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
766 766
767 767 processed revlogs:
768 768 - all-filelogs
769 769 - changelog
770 770 - manifest
771 771
772 772 beginning upgrade...
773 773 repository locked and read-only
774 774 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
775 775 (it is safe to interrupt this process any time before data migration completes)
776 776 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
777 777 migrating 519 KB in store; 1.05 MB tracked data
778 778 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
779 779 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
780 780 migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data)
781 781 finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes
782 782 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
783 783 finished migrating 3 changelog revisions; change in size: 0 bytes
784 784 finished migrating 9 total revisions; total change in store size: -17 bytes
785 785 copying phaseroots
786 786 copying requires
787 787 data fully upgraded in a temporary repository
788 788 marking source repository as being upgraded; clients will be unable to read from repository
789 789 starting in-place swap of repository data
790 790 replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
791 791 replacing store...
792 792 store replacement complete; repository was inconsistent for *s (glob)
793 793 finalizing requirements file and making repository readable again
794 794 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
795 795 copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
796 796 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
797 797
798 798 Original requirements backed up
799 799
800 800 $ cat .hg/upgradebackup.*/requires
801 801 share-safe
802 802 $ cat .hg/upgradebackup.*/store/requires
803 803 dotencode
804 804 fncache
805 805 persistent-nodemap (rust !)
806 806 revlogv1
807 807 store
808 808 upgradeinprogress
809 809
810 810 generaldelta added to original requirements files
811 811
812 812 $ hg debugrequires
813 813 dotencode
814 814 fncache
815 815 generaldelta
816 816 persistent-nodemap (rust !)
817 817 revlogv1
818 818 share-safe
819 819 store
820 820
821 821 store directory has files we expect
822 822
823 823 $ ls .hg/store
824 824 00changelog.i
825 825 00manifest.i
826 826 data
827 827 fncache
828 828 phaseroots
829 829 requires
830 830 undo
831 831 undo.backupfiles
832 832 undo.phaseroots
833 833
834 834 manifest should be generaldelta
835 835
836 836 $ hg debugrevlog -m | grep flags
837 837 flags : inline, generaldelta
838 838
839 839 verify should be happy
840 840
841 841 $ hg verify
842 842 checking changesets
843 843 checking manifests
844 844 crosschecking files in changesets and manifests
845 845 checking files
846 846 checked 3 changesets with 3 changes to 3 files
847 847
848 848 old store should be backed up
849 849
850 850 $ ls -d .hg/upgradebackup.*/
851 851 .hg/upgradebackup.*/ (glob)
852 852 $ ls .hg/upgradebackup.*/store
853 853 00changelog.i
854 854 00manifest.i
855 855 data
856 856 fncache
857 857 phaseroots
858 858 requires
859 859 undo
860 860 undo.backup.fncache
861 861 undo.backupfiles
862 862 undo.phaseroots
863 863
864 864 unless --no-backup is passed
865 865
866 866 $ rm -rf .hg/upgradebackup.*/
867 867 $ hg debugupgraderepo --run --no-backup
868 868 note: selecting all-filelogs for processing to change: sparserevlog
869 869 note: selecting all-manifestlogs for processing to change: sparserevlog
870 870 note: selecting changelog for processing to change: sparserevlog
871 871
872 872 upgrade will perform the following actions:
873 873
874 874 requirements
875 875 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
876 876 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
877 877 added: sparserevlog
878 878
879 879 sparserevlog
880 880 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
881 881
882 882 processed revlogs:
883 883 - all-filelogs
884 884 - changelog
885 885 - manifest
886 886
887 887 beginning upgrade...
888 888 repository locked and read-only
889 889 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
890 890 (it is safe to interrupt this process any time before data migration completes)
891 891 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
892 892 migrating 519 KB in store; 1.05 MB tracked data
893 893 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
894 894 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
895 895 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
896 896 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
897 897 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
898 898 finished migrating 3 changelog revisions; change in size: 0 bytes
899 899 finished migrating 9 total revisions; total change in store size: 0 bytes
900 900 copying phaseroots
901 901 copying requires
902 902 data fully upgraded in a temporary repository
903 903 marking source repository as being upgraded; clients will be unable to read from repository
904 904 starting in-place swap of repository data
905 905 replacing store...
906 906 store replacement complete; repository was inconsistent for * (glob)
907 907 finalizing requirements file and making repository readable again
908 908 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
909 909 $ ls -1 .hg/ | grep upgradebackup
910 910 [1]
911 911
912 912 We can restrict optimization to some revlog:
913 913
914 914 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
915 915 upgrade will perform the following actions:
916 916
917 917 requirements
918 918 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
919 919 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
920 920
921 921 optimisations: re-delta-parent
922 922
923 923 re-delta-parent
924 924 deltas within internal storage will choose a new base revision if needed
925 925
926 926 processed revlogs:
927 927 - manifest
928 928
929 929 beginning upgrade...
930 930 repository locked and read-only
931 931 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
932 932 (it is safe to interrupt this process any time before data migration completes)
933 933 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
934 934 migrating 519 KB in store; 1.05 MB tracked data
935 935 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
936 936 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
937 937 blindly copying data/f0.i containing 1 revisions
938 938 blindly copying data/f2.i containing 1 revisions
939 939 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
940 940 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
941 941 cloning 3 revisions from 00manifest.i
942 942 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
943 943 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
944 944 blindly copying 00changelog.i containing 3 revisions
945 945 finished migrating 3 changelog revisions; change in size: 0 bytes
946 946 finished migrating 9 total revisions; total change in store size: 0 bytes
947 947 copying phaseroots
948 948 copying requires
949 949 data fully upgraded in a temporary repository
950 950 marking source repository as being upgraded; clients will be unable to read from repository
951 951 starting in-place swap of repository data
952 952 replacing store...
953 953 store replacement complete; repository was inconsistent for *s (glob)
954 954 finalizing requirements file and making repository readable again
955 955 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
956 956
957 957 Check that the repo still works fine
958 958
959 959 $ hg log -G --stat
960 960 @ changeset: 2:fca376863211 (py3 !)
961 961 | tag: tip
962 962 | parent: 0:ba592bf28da2
963 963 | user: test
964 964 | date: Thu Jan 01 00:00:00 1970 +0000
965 965 | summary: add f2
966 966 |
967 967 | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
968 968 | 1 files changed, 100000 insertions(+), 0 deletions(-)
969 969 |
970 970 | o changeset: 1:2029ce2354e2
971 971 |/ user: test
972 972 | date: Thu Jan 01 00:00:00 1970 +0000
973 973 | summary: add f1
974 974 |
975 975 |
976 976 o changeset: 0:ba592bf28da2
977 977 user: test
978 978 date: Thu Jan 01 00:00:00 1970 +0000
979 979 summary: initial
980 980
981 981
982 982
983 983 $ hg verify
984 984 checking changesets
985 985 checking manifests
986 986 crosschecking files in changesets and manifests
987 987 checking files
988 988 checked 3 changesets with 3 changes to 3 files
989 989
990 990 Check we can select negatively
991 991
992 992 $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback
993 993 upgrade will perform the following actions:
994 994
995 995 requirements
996 996 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
997 997 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
998 998
999 999 optimisations: re-delta-parent
1000 1000
1001 1001 re-delta-parent
1002 1002 deltas within internal storage will choose a new base revision if needed
1003 1003
1004 1004 processed revlogs:
1005 1005 - all-filelogs
1006 1006 - changelog
1007 1007
1008 1008 beginning upgrade...
1009 1009 repository locked and read-only
1010 1010 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1011 1011 (it is safe to interrupt this process any time before data migration completes)
1012 1012 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1013 1013 migrating 519 KB in store; 1.05 MB tracked data
1014 1014 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1015 1015 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1016 1016 cloning 1 revisions from data/f0.i
1017 1017 cloning 1 revisions from data/f2.i
1018 1018 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1019 1019 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1020 1020 blindly copying 00manifest.i containing 3 revisions
1021 1021 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1022 1022 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1023 1023 cloning 3 revisions from 00changelog.i
1024 1024 finished migrating 3 changelog revisions; change in size: 0 bytes
1025 1025 finished migrating 9 total revisions; total change in store size: 0 bytes
1026 1026 copying phaseroots
1027 1027 copying requires
1028 1028 data fully upgraded in a temporary repository
1029 1029 marking source repository as being upgraded; clients will be unable to read from repository
1030 1030 starting in-place swap of repository data
1031 1031 replacing store...
1032 1032 store replacement complete; repository was inconsistent for *s (glob)
1033 1033 finalizing requirements file and making repository readable again
1034 1034 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1035 1035 $ hg verify
1036 1036 checking changesets
1037 1037 checking manifests
1038 1038 crosschecking files in changesets and manifests
1039 1039 checking files
1040 1040 checked 3 changesets with 3 changes to 3 files
1041 1041
1042 1042 Check that we can select changelog only
1043 1043
1044 1044 $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback
1045 1045 upgrade will perform the following actions:
1046 1046
1047 1047 requirements
1048 1048 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1049 1049 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1050 1050
1051 1051 optimisations: re-delta-parent
1052 1052
1053 1053 re-delta-parent
1054 1054 deltas within internal storage will choose a new base revision if needed
1055 1055
1056 1056 processed revlogs:
1057 1057 - changelog
1058 1058
1059 1059 beginning upgrade...
1060 1060 repository locked and read-only
1061 1061 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1062 1062 (it is safe to interrupt this process any time before data migration completes)
1063 1063 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1064 1064 migrating 519 KB in store; 1.05 MB tracked data
1065 1065 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1066 1066 blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions
1067 1067 blindly copying data/f0.i containing 1 revisions
1068 1068 blindly copying data/f2.i containing 1 revisions
1069 1069 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1070 1070 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1071 1071 blindly copying 00manifest.i containing 3 revisions
1072 1072 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1073 1073 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1074 1074 cloning 3 revisions from 00changelog.i
1075 1075 finished migrating 3 changelog revisions; change in size: 0 bytes
1076 1076 finished migrating 9 total revisions; total change in store size: 0 bytes
1077 1077 copying phaseroots
1078 1078 copying requires
1079 1079 data fully upgraded in a temporary repository
1080 1080 marking source repository as being upgraded; clients will be unable to read from repository
1081 1081 starting in-place swap of repository data
1082 1082 replacing store...
1083 1083 store replacement complete; repository was inconsistent for *s (glob)
1084 1084 finalizing requirements file and making repository readable again
1085 1085 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1086 1086 $ hg verify
1087 1087 checking changesets
1088 1088 checking manifests
1089 1089 crosschecking files in changesets and manifests
1090 1090 checking files
1091 1091 checked 3 changesets with 3 changes to 3 files
1092 1092
1093 1093 Check that we can select filelog only
1094 1094
1095 1095 $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback
1096 1096 upgrade will perform the following actions:
1097 1097
1098 1098 requirements
1099 1099 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1100 1100 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1101 1101
1102 1102 optimisations: re-delta-parent
1103 1103
1104 1104 re-delta-parent
1105 1105 deltas within internal storage will choose a new base revision if needed
1106 1106
1107 1107 processed revlogs:
1108 1108 - all-filelogs
1109 1109
1110 1110 beginning upgrade...
1111 1111 repository locked and read-only
1112 1112 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1113 1113 (it is safe to interrupt this process any time before data migration completes)
1114 1114 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1115 1115 migrating 519 KB in store; 1.05 MB tracked data
1116 1116 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1117 1117 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1118 1118 cloning 1 revisions from data/f0.i
1119 1119 cloning 1 revisions from data/f2.i
1120 1120 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1121 1121 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1122 1122 blindly copying 00manifest.i containing 3 revisions
1123 1123 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1124 1124 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1125 1125 blindly copying 00changelog.i containing 3 revisions
1126 1126 finished migrating 3 changelog revisions; change in size: 0 bytes
1127 1127 finished migrating 9 total revisions; total change in store size: 0 bytes
1128 1128 copying phaseroots
1129 1129 copying requires
1130 1130 data fully upgraded in a temporary repository
1131 1131 marking source repository as being upgraded; clients will be unable to read from repository
1132 1132 starting in-place swap of repository data
1133 1133 replacing store...
1134 1134 store replacement complete; repository was inconsistent for *s (glob)
1135 1135 finalizing requirements file and making repository readable again
1136 1136 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1137 1137 $ hg verify
1138 1138 checking changesets
1139 1139 checking manifests
1140 1140 crosschecking files in changesets and manifests
1141 1141 checking files
1142 1142 checked 3 changesets with 3 changes to 3 files
1143 1143
1144 1144
1145 1145 Check you can't skip revlog clone during important format downgrade
1146 1146
1147 1147 $ echo "[format]" > .hg/hgrc
1148 1148 $ echo "sparse-revlog=no" >> .hg/hgrc
1149 1149 $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet
1150 1150 warning: ignoring --no-manifest, as upgrade is changing: sparserevlog
1151 1151
1152 1152 requirements
1153 1153 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1154 1154 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1155 1155 removed: sparserevlog
1156 1156
1157 1157 optimisations: re-delta-parent
1158 1158
1159 1159 processed revlogs:
1160 1160 - all-filelogs
1161 1161 - changelog
1162 1162 - manifest
1163 1163
1164 1164 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1165 1165 note: selecting all-filelogs for processing to change: sparserevlog
1166 1166 note: selecting changelog for processing to change: sparserevlog
1167 1167
1168 1168 upgrade will perform the following actions:
1169 1169
1170 1170 requirements
1171 1171 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1172 1172 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1173 1173 removed: sparserevlog
1174 1174
1175 1175 optimisations: re-delta-parent
1176 1176
1177 1177 re-delta-parent
1178 1178 deltas within internal storage will choose a new base revision if needed
1179 1179
1180 1180 processed revlogs:
1181 1181 - all-filelogs
1182 1182 - changelog
1183 1183 - manifest
1184 1184
1185 1185 beginning upgrade...
1186 1186 repository locked and read-only
1187 1187 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1188 1188 (it is safe to interrupt this process any time before data migration completes)
1189 1189 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1190 1190 migrating 519 KB in store; 1.05 MB tracked data
1191 1191 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1192 1192 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1193 1193 cloning 1 revisions from data/f0.i
1194 1194 cloning 1 revisions from data/f2.i
1195 1195 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1196 1196 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1197 1197 cloning 3 revisions from 00manifest.i
1198 1198 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1199 1199 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1200 1200 cloning 3 revisions from 00changelog.i
1201 1201 finished migrating 3 changelog revisions; change in size: 0 bytes
1202 1202 finished migrating 9 total revisions; total change in store size: 0 bytes
1203 1203 copying phaseroots
1204 1204 copying requires
1205 1205 data fully upgraded in a temporary repository
1206 1206 marking source repository as being upgraded; clients will be unable to read from repository
1207 1207 starting in-place swap of repository data
1208 1208 replacing store...
1209 1209 store replacement complete; repository was inconsistent for *s (glob)
1210 1210 finalizing requirements file and making repository readable again
1211 1211 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1212 1212 $ hg verify
1213 1213 checking changesets
1214 1214 checking manifests
1215 1215 crosschecking files in changesets and manifests
1216 1216 checking files
1217 1217 checked 3 changesets with 3 changes to 3 files
1218 1218
1219 1219 Check you can't skip revlog clone during important format upgrade
1220 1220
1221 1221 $ echo "sparse-revlog=yes" >> .hg/hgrc
1222 1222 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1223 1223 note: selecting all-filelogs for processing to change: sparserevlog
1224 1224 note: selecting changelog for processing to change: sparserevlog
1225 1225
1226 1226 upgrade will perform the following actions:
1227 1227
1228 1228 requirements
1229 1229 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1230 1230 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1231 1231 added: sparserevlog
1232 1232
1233 1233 optimisations: re-delta-parent
1234 1234
1235 1235 sparserevlog
1236 1236 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
1237 1237
1238 1238 re-delta-parent
1239 1239 deltas within internal storage will choose a new base revision if needed
1240 1240
1241 1241 processed revlogs:
1242 1242 - all-filelogs
1243 1243 - changelog
1244 1244 - manifest
1245 1245
1246 1246 beginning upgrade...
1247 1247 repository locked and read-only
1248 1248 creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1249 1249 (it is safe to interrupt this process any time before data migration completes)
1250 1250 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1251 1251 migrating 519 KB in store; 1.05 MB tracked data
1252 1252 migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data)
1253 1253 cloning 1 revisions from data/FooBarDirectory.d/f1.i
1254 1254 cloning 1 revisions from data/f0.i
1255 1255 cloning 1 revisions from data/f2.i
1256 1256 finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
1257 1257 migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data)
1258 1258 cloning 3 revisions from 00manifest.i
1259 1259 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1260 1260 migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data)
1261 1261 cloning 3 revisions from 00changelog.i
1262 1262 finished migrating 3 changelog revisions; change in size: 0 bytes
1263 1263 finished migrating 9 total revisions; total change in store size: 0 bytes
1264 1264 copying phaseroots
1265 1265 copying requires
1266 1266 data fully upgraded in a temporary repository
1267 1267 marking source repository as being upgraded; clients will be unable to read from repository
1268 1268 starting in-place swap of repository data
1269 1269 replacing store...
1270 1270 store replacement complete; repository was inconsistent for *s (glob)
1271 1271 finalizing requirements file and making repository readable again
1272 1272 removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
1273 1273 $ hg verify
1274 1274 checking changesets
1275 1275 checking manifests
1276 1276 crosschecking files in changesets and manifests
1277 1277 checking files
1278 1278 checked 3 changesets with 3 changes to 3 files
1279 1279
1280 1280 $ cd ..
1281 1281
1282 1282 store files with special filenames aren't encoded during copy
1283 1283
1284 1284 $ hg init store-filenames
1285 1285 $ cd store-filenames
1286 1286 $ touch foo
1287 1287 $ hg -q commit -A -m initial
1288 1288 $ touch .hg/store/.XX_special_filename
1289 1289
1290 1290 $ hg debugupgraderepo --run
1291 1291 nothing to do
1292 1292 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1293 1293 upgrade will perform the following actions:
1294 1294
1295 1295 requirements
1296 1296 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1297 1297 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1298 1298
1299 1299 optimisations: re-delta-fulladd
1300 1300
1301 1301 re-delta-fulladd
1302 1302 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
1303 1303
1304 1304 processed revlogs:
1305 1305 - all-filelogs
1306 1306 - changelog
1307 1307 - manifest
1308 1308
1309 1309 beginning upgrade...
1310 1310 repository locked and read-only
1311 1311 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1312 1312 (it is safe to interrupt this process any time before data migration completes)
1313 1313 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1314 1314 migrating 301 bytes in store; 107 bytes tracked data
1315 1315 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1316 1316 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1317 1317 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1318 1318 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1319 1319 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1320 1320 finished migrating 1 changelog revisions; change in size: 0 bytes
1321 1321 finished migrating 3 total revisions; total change in store size: 0 bytes
1322 1322 copying .XX_special_filename
1323 1323 copying phaseroots
1324 1324 copying requires
1325 1325 data fully upgraded in a temporary repository
1326 1326 marking source repository as being upgraded; clients will be unable to read from repository
1327 1327 starting in-place swap of repository data
1328 1328 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1329 1329 replacing store...
1330 1330 store replacement complete; repository was inconsistent for *s (glob)
1331 1331 finalizing requirements file and making repository readable again
1332 1332 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1333 1333 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1334 1334 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1335 1335
1336 1336 fncache is valid after upgrade
1337 1337
1338 1338 $ hg debugrebuildfncache
1339 1339 fncache already up to date
1340 1340
1341 1341 $ cd ..
1342 1342
1343 1343 Check upgrading a large file repository
1344 1344 ---------------------------------------
1345 1345
1346 1346 $ hg init largefilesrepo
1347 1347 $ cat << EOF >> largefilesrepo/.hg/hgrc
1348 1348 > [extensions]
1349 1349 > largefiles =
1350 1350 > EOF
1351 1351
1352 1352 $ cd largefilesrepo
1353 1353 $ touch foo
1354 1354 $ hg add --large foo
1355 1355 $ hg -q commit -m initial
1356 1356 $ hg debugrequires
1357 1357 dotencode
1358 1358 fncache
1359 1359 generaldelta
1360 1360 largefiles
1361 1361 persistent-nodemap (rust !)
1362 1362 revlogv1
1363 1363 share-safe
1364 1364 sparserevlog
1365 1365 store
1366 1366
1367 1367 $ hg debugupgraderepo --run
1368 1368 nothing to do
1369 1369 $ hg debugrequires
1370 1370 dotencode
1371 1371 fncache
1372 1372 generaldelta
1373 1373 largefiles
1374 1374 persistent-nodemap (rust !)
1375 1375 revlogv1
1376 1376 share-safe
1377 1377 sparserevlog
1378 1378 store
1379 1379
1380 1380 $ cat << EOF >> .hg/hgrc
1381 1381 > [extensions]
1382 1382 > lfs =
1383 1383 > [lfs]
1384 1384 > threshold = 10
1385 1385 > EOF
1386 1386 $ echo '123456789012345' > lfs.bin
1387 1387 $ hg ci -Am 'lfs.bin'
1388 1388 adding lfs.bin
1389 1389 $ hg debugrequires | grep lfs
1390 1390 lfs
1391 1391 $ find .hg/store/lfs -type f
1392 1392 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1393 1393
1394 1394 $ hg debugupgraderepo --run
1395 1395 nothing to do
1396 1396
1397 1397 $ hg debugrequires | grep lfs
1398 1398 lfs
1399 1399 $ find .hg/store/lfs -type f
1400 1400 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1401 1401 $ hg verify
1402 1402 checking changesets
1403 1403 checking manifests
1404 1404 crosschecking files in changesets and manifests
1405 1405 checking files
1406 1406 checked 2 changesets with 2 changes to 2 files
1407 1407 $ hg debugdata lfs.bin 0
1408 1408 version https://git-lfs.github.com/spec/v1
1409 1409 oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1410 1410 size 16
1411 1411 x-is-binary 0
1412 1412
1413 1413 $ cd ..
1414 1414
1415 1415 repository config is taken in account
1416 1416 -------------------------------------
1417 1417
1418 1418 $ cat << EOF >> $HGRCPATH
1419 1419 > [format]
1420 1420 > maxchainlen = 1
1421 1421 > EOF
1422 1422
1423 1423 $ hg init localconfig
1424 1424 $ cd localconfig
1425 1425 $ cat << EOF > file
1426 1426 > some content
1427 1427 > with some length
1428 1428 > to make sure we get a delta
1429 1429 > after changes
1430 1430 > very long
1431 1431 > very long
1432 1432 > very long
1433 1433 > very long
1434 1434 > very long
1435 1435 > very long
1436 1436 > very long
1437 1437 > very long
1438 1438 > very long
1439 1439 > very long
1440 1440 > very long
1441 1441 > EOF
1442 1442 $ hg -q commit -A -m A
1443 1443 $ echo "new line" >> file
1444 1444 $ hg -q commit -m B
1445 1445 $ echo "new line" >> file
1446 1446 $ hg -q commit -m C
1447 1447
1448 1448 $ cat << EOF >> .hg/hgrc
1449 1449 > [format]
1450 1450 > maxchainlen = 9001
1451 1451 > EOF
1452 1452 $ hg config format
1453 1453 format.revlog-compression=$BUNDLE2_COMPRESSIONS$
1454 1454 format.maxchainlen=9001
1455 1455 $ hg debugdeltachain file
1456 1456 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1457 1457 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1458 1458 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1459 1459 2 1 -1 1 2 0 snap 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1460 1460
1461 1461 $ hg debugupgraderepo --run --optimize 're-delta-all'
1462 1462 upgrade will perform the following actions:
1463 1463
1464 1464 requirements
1465 1465 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1466 1466 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1467 1467
1468 1468 optimisations: re-delta-all
1469 1469
1470 1470 re-delta-all
1471 1471 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
1472 1472
1473 1473 processed revlogs:
1474 1474 - all-filelogs
1475 1475 - changelog
1476 1476 - manifest
1477 1477
1478 1478 beginning upgrade...
1479 1479 repository locked and read-only
1480 1480 creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
1481 1481 (it is safe to interrupt this process any time before data migration completes)
1482 1482 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
1483 1483 migrating 1019 bytes in store; 882 bytes tracked data
1484 1484 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
1485 1485 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
1486 1486 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
1487 1487 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
1488 1488 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
1489 1489 finished migrating 3 changelog revisions; change in size: 0 bytes
1490 1490 finished migrating 9 total revisions; total change in store size: -9 bytes
1491 1491 copying phaseroots
1492 1492 copying requires
1493 1493 data fully upgraded in a temporary repository
1494 1494 marking source repository as being upgraded; clients will be unable to read from repository
1495 1495 starting in-place swap of repository data
1496 1496 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1497 1497 replacing store...
1498 1498 store replacement complete; repository was inconsistent for *s (glob)
1499 1499 finalizing requirements file and making repository readable again
1500 1500 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
1501 1501 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
1502 1502 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1503 1503 $ hg debugdeltachain file
1504 1504 rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
1505 1505 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
1506 1506 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1507 1507 2 1 -1 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
1508 1508 $ cd ..
1509 1509
1510 1510 $ cat << EOF >> $HGRCPATH
1511 1511 > [format]
1512 1512 > maxchainlen = 9001
1513 1513 > EOF
1514 1514
1515 1515 Check upgrading a sparse-revlog repository
1516 1516 ---------------------------------------
1517 1517
1518 1518 $ hg init sparserevlogrepo --config format.sparse-revlog=no
1519 1519 $ cd sparserevlogrepo
1520 1520 $ touch foo
1521 1521 $ hg add foo
1522 1522 $ hg -q commit -m "foo"
1523 1523 $ hg debugrequires
1524 1524 dotencode
1525 1525 fncache
1526 1526 generaldelta
1527 1527 persistent-nodemap (rust !)
1528 1528 revlogv1
1529 1529 share-safe
1530 1530 store
1531 1531
1532 1532 Check that we can add the sparse-revlog format requirement
1533 1533 $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet
1534 1534 upgrade will perform the following actions:
1535 1535
1536 1536 requirements
1537 1537 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1538 1538 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1539 1539 added: sparserevlog
1540 1540
1541 1541 processed revlogs:
1542 1542 - all-filelogs
1543 1543 - changelog
1544 1544 - manifest
1545 1545
1546 1546 $ hg debugrequires
1547 1547 dotencode
1548 1548 fncache
1549 1549 generaldelta
1550 1550 persistent-nodemap (rust !)
1551 1551 revlogv1
1552 1552 share-safe
1553 1553 sparserevlog
1554 1554 store
1555 1555
1556 1556 Check that we can remove the sparse-revlog format requirement
1557 1557 $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet
1558 1558 upgrade will perform the following actions:
1559 1559
1560 1560 requirements
1561 1561 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1562 1562 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1563 1563 removed: sparserevlog
1564 1564
1565 1565 processed revlogs:
1566 1566 - all-filelogs
1567 1567 - changelog
1568 1568 - manifest
1569 1569
1570 1570 $ hg debugrequires
1571 1571 dotencode
1572 1572 fncache
1573 1573 generaldelta
1574 1574 persistent-nodemap (rust !)
1575 1575 revlogv1
1576 1576 share-safe
1577 1577 store
1578 1578
1579 1579 #if zstd
1580 1580
1581 1581 Check upgrading to a zstd revlog
1582 1582 --------------------------------
1583 1583
1584 1584 upgrade
1585 1585
1586 1586 $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet
1587 1587 upgrade will perform the following actions:
1588 1588
1589 1589 requirements
1590 1590 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !)
1591 1591 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !)
1592 1592 added: revlog-compression-zstd, sparserevlog
1593 1593
1594 1594 processed revlogs:
1595 1595 - all-filelogs
1596 1596 - changelog
1597 1597 - manifest
1598 1598
1599 1599 $ hg debugformat -v
1600 1600 format-variant repo config default
1601 1601 fncache: yes yes yes
1602 1602 dirstate-v2: no no no
1603 1603 tracked-hint: no no no
1604 1604 dotencode: yes yes yes
1605 1605 generaldelta: yes yes yes
1606 1606 share-safe: yes yes yes
1607 1607 sparserevlog: yes yes yes
1608 1608 persistent-nodemap: no no no (no-rust !)
1609 1609 persistent-nodemap: yes yes no (rust !)
1610 1610 copies-sdc: no no no
1611 1611 revlog-v2: no no no
1612 1612 changelog-v2: no no no
1613 1613 plain-cl-delta: yes yes yes
1614 1614 compression: zlib zlib zlib (no-zstd !)
1615 1615 compression: zstd zlib zstd (zstd !)
1616 1616 compression-level: default default default
1617 1617 $ hg debugrequires
1618 1618 dotencode
1619 1619 fncache
1620 1620 generaldelta
1621 1621 persistent-nodemap (rust !)
1622 1622 revlog-compression-zstd
1623 1623 revlogv1
1624 1624 share-safe
1625 1625 sparserevlog
1626 1626 store
1627 1627
1628 1628 downgrade
1629 1629
1630 1630 $ hg debugupgraderepo --run --no-backup --quiet
1631 1631 upgrade will perform the following actions:
1632 1632
1633 1633 requirements
1634 1634 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1635 1635 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1636 1636 removed: revlog-compression-zstd
1637 1637
1638 1638 processed revlogs:
1639 1639 - all-filelogs
1640 1640 - changelog
1641 1641 - manifest
1642 1642
1643 1643 $ hg debugformat -v
1644 1644 format-variant repo config default
1645 1645 fncache: yes yes yes
1646 1646 dirstate-v2: no no no
1647 1647 tracked-hint: no no no
1648 1648 dotencode: yes yes yes
1649 1649 generaldelta: yes yes yes
1650 1650 share-safe: yes yes yes
1651 1651 sparserevlog: yes yes yes
1652 1652 persistent-nodemap: no no no (no-rust !)
1653 1653 persistent-nodemap: yes yes no (rust !)
1654 1654 copies-sdc: no no no
1655 1655 revlog-v2: no no no
1656 1656 changelog-v2: no no no
1657 1657 plain-cl-delta: yes yes yes
1658 1658 compression: zlib zlib zlib (no-zstd !)
1659 1659 compression: zlib zlib zstd (zstd !)
1660 1660 compression-level: default default default
1661 1661 $ hg debugrequires
1662 1662 dotencode
1663 1663 fncache
1664 1664 generaldelta
1665 1665 persistent-nodemap (rust !)
1666 1666 revlogv1
1667 1667 share-safe
1668 1668 sparserevlog
1669 1669 store
1670 1670
1671 1671 upgrade from hgrc
1672 1672
1673 1673 $ cat >> .hg/hgrc << EOF
1674 1674 > [format]
1675 1675 > revlog-compression=zstd
1676 1676 > EOF
1677 1677 $ hg debugupgraderepo --run --no-backup --quiet
1678 1678 upgrade will perform the following actions:
1679 1679
1680 1680 requirements
1681 1681 preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
1682 1682 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !)
1683 1683 added: revlog-compression-zstd
1684 1684
1685 1685 processed revlogs:
1686 1686 - all-filelogs
1687 1687 - changelog
1688 1688 - manifest
1689 1689
1690 1690 $ hg debugformat -v
1691 1691 format-variant repo config default
1692 1692 fncache: yes yes yes
1693 1693 dirstate-v2: no no no
1694 1694 tracked-hint: no no no
1695 1695 dotencode: yes yes yes
1696 1696 generaldelta: yes yes yes
1697 1697 share-safe: yes yes yes
1698 1698 sparserevlog: yes yes yes
1699 1699 persistent-nodemap: no no no (no-rust !)
1700 1700 persistent-nodemap: yes yes no (rust !)
1701 1701 copies-sdc: no no no
1702 1702 revlog-v2: no no no
1703 1703 changelog-v2: no no no
1704 1704 plain-cl-delta: yes yes yes
1705 1705 compression: zlib zlib zlib (no-zstd !)
1706 1706 compression: zstd zstd zstd (zstd !)
1707 1707 compression-level: default default default
1708 1708 $ hg debugrequires
1709 1709 dotencode
1710 1710 fncache
1711 1711 generaldelta
1712 1712 persistent-nodemap (rust !)
1713 1713 revlog-compression-zstd
1714 1714 revlogv1
1715 1715 share-safe
1716 1716 sparserevlog
1717 1717 store
1718 1718
1719 1719 #endif
1720 1720
1721 1721 Check upgrading to a revlog format supporting sidedata
1722 1722 ------------------------------------------------------
1723 1723
1724 1724 upgrade
1725 1725
1726 1726 $ hg debugsidedata -c 0
1727 1727 $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet
1728 1728 upgrade will perform the following actions:
1729 1729
1730 1730 requirements
1731 1731 preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !)
1732 1732 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1733 1733 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1734 1734 removed: revlogv1
1735 1735 added: exp-revlogv2.2 (zstd !)
1736 1736 added: exp-revlogv2.2, sparserevlog (no-zstd !)
1737 1737
1738 1738 processed revlogs:
1739 1739 - all-filelogs
1740 1740 - changelog
1741 1741 - manifest
1742 1742
1743 1743 $ hg debugformat -v
1744 1744 format-variant repo config default
1745 1745 fncache: yes yes yes
1746 1746 dirstate-v2: no no no
1747 1747 tracked-hint: no no no
1748 1748 dotencode: yes yes yes
1749 1749 generaldelta: yes yes yes
1750 1750 share-safe: yes yes yes
1751 1751 sparserevlog: yes yes yes
1752 1752 persistent-nodemap: no no no (no-rust !)
1753 1753 persistent-nodemap: yes yes no (rust !)
1754 1754 copies-sdc: no no no
1755 1755 revlog-v2: yes no no
1756 1756 changelog-v2: no no no
1757 1757 plain-cl-delta: yes yes yes
1758 1758 compression: zlib zlib zlib (no-zstd !)
1759 1759 compression: zstd zstd zstd (zstd !)
1760 1760 compression-level: default default default
1761 1761 $ hg debugrequires
1762 1762 dotencode
1763 1763 exp-revlogv2.2
1764 1764 fncache
1765 1765 generaldelta
1766 1766 persistent-nodemap (rust !)
1767 1767 revlog-compression-zstd (zstd !)
1768 1768 share-safe
1769 1769 sparserevlog
1770 1770 store
1771 1771 $ hg debugsidedata -c 0
1772 1772 2 sidedata entries
1773 1773 entry-0001 size 4
1774 1774 entry-0002 size 32
1775 1775
1776 1776 downgrade
1777 1777
1778 1778 $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet
1779 1779 upgrade will perform the following actions:
1780 1780
1781 1781 requirements
1782 1782 preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !)
1783 1783 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1784 1784 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1785 1785 removed: exp-revlogv2.2
1786 1786 added: revlogv1
1787 1787
1788 1788 processed revlogs:
1789 1789 - all-filelogs
1790 1790 - changelog
1791 1791 - manifest
1792 1792
1793 1793 $ hg debugformat -v
1794 1794 format-variant repo config default
1795 1795 fncache: yes yes yes
1796 1796 dirstate-v2: no no no
1797 1797 tracked-hint: no no no
1798 1798 dotencode: yes yes yes
1799 1799 generaldelta: yes yes yes
1800 1800 share-safe: yes yes yes
1801 1801 sparserevlog: yes yes yes
1802 1802 persistent-nodemap: no no no (no-rust !)
1803 1803 persistent-nodemap: yes yes no (rust !)
1804 1804 copies-sdc: no no no
1805 1805 revlog-v2: no no no
1806 1806 changelog-v2: no no no
1807 1807 plain-cl-delta: yes yes yes
1808 1808 compression: zlib zlib zlib (no-zstd !)
1809 1809 compression: zstd zstd zstd (zstd !)
1810 1810 compression-level: default default default
1811 1811 $ hg debugrequires
1812 1812 dotencode
1813 1813 fncache
1814 1814 generaldelta
1815 1815 persistent-nodemap (rust !)
1816 1816 revlog-compression-zstd (zstd !)
1817 1817 revlogv1
1818 1818 share-safe
1819 1819 sparserevlog
1820 1820 store
1821 1821 $ hg debugsidedata -c 0
1822 1822
1823 1823 upgrade from hgrc
1824 1824
1825 1825 $ cat >> .hg/hgrc << EOF
1826 1826 > [experimental]
1827 1827 > revlogv2=enable-unstable-format-and-corrupt-my-data
1828 1828 > EOF
1829 1829 $ hg debugupgraderepo --run --no-backup --quiet
1830 1830 upgrade will perform the following actions:
1831 1831
1832 1832 requirements
1833 1833 preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !)
1834 1834 preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !)
1835 1835 preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !)
1836 1836 removed: revlogv1
1837 1837 added: exp-revlogv2.2
1838 1838
1839 1839 processed revlogs:
1840 1840 - all-filelogs
1841 1841 - changelog
1842 1842 - manifest
1843 1843
1844 1844 $ hg debugformat -v
1845 1845 format-variant repo config default
1846 1846 fncache: yes yes yes
1847 1847 dirstate-v2: no no no
1848 1848 tracked-hint: no no no
1849 1849 dotencode: yes yes yes
1850 1850 generaldelta: yes yes yes
1851 1851 share-safe: yes yes yes
1852 1852 sparserevlog: yes yes yes
1853 1853 persistent-nodemap: no no no (no-rust !)
1854 1854 persistent-nodemap: yes yes no (rust !)
1855 1855 copies-sdc: no no no
1856 1856 revlog-v2: yes yes no
1857 1857 changelog-v2: no no no
1858 1858 plain-cl-delta: yes yes yes
1859 1859 compression: zlib zlib zlib (no-zstd !)
1860 1860 compression: zstd zstd zstd (zstd !)
1861 1861 compression-level: default default default
1862 1862 $ hg debugrequires
1863 1863 dotencode
1864 1864 exp-revlogv2.2
1865 1865 fncache
1866 1866 generaldelta
1867 1867 persistent-nodemap (rust !)
1868 1868 revlog-compression-zstd (zstd !)
1869 1869 share-safe
1870 1870 sparserevlog
1871 1871 store
1872 1872 $ hg debugsidedata -c 0
1873 1873
1874 1874 Demonstrate that nothing to perform upgrade will still run all the way through
1875 1875
1876 1876 $ hg debugupgraderepo --run
1877 1877 nothing to do
1878 1878
1879 1879 #if no-rust
1880 1880
1881 1881 $ cat << EOF >> $HGRCPATH
1882 1882 > [storage]
1883 1883 > dirstate-v2.slow-path = allow
1884 1884 > EOF
1885 1885
1886 1886 #endif
1887 1887
1888 1888 Upgrade to dirstate-v2
1889 1889
1890 1890 $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2
1891 1891 dirstate-v2: no yes no
1892 1892 $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run
1893 1893 upgrade will perform the following actions:
1894 1894
1895 1895 requirements
1896 1896 preserved: * (glob)
1897 1897 added: dirstate-v2
1898 1898
1899 1899 dirstate-v2
1900 1900 "hg status" will be faster
1901 1901
1902 1902 no revlogs to process
1903 1903
1904 1904 beginning upgrade...
1905 1905 repository locked and read-only
1906 1906 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1907 1907 (it is safe to interrupt this process any time before data migration completes)
1908 1908 upgrading to dirstate-v2 from v1
1909 1909 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1910 1910 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1911 1911 $ ls .hg/upgradebackup.*/dirstate
1912 1912 .hg/upgradebackup.*/dirstate (glob)
1913 1913 $ hg debugformat -v | grep dirstate-v2
1914 1914 dirstate-v2: yes no no
1915 1915 $ hg status
1916 1916 $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null
1917 1917 dirstate-v2
1918 1918
1919 1919 Downgrade from dirstate-v2
1920 1920
1921 1921 $ hg debugupgraderepo --run
1922 1922 upgrade will perform the following actions:
1923 1923
1924 1924 requirements
1925 1925 preserved: * (glob)
1926 1926 removed: dirstate-v2
1927 1927
1928 1928 no revlogs to process
1929 1929
1930 1930 beginning upgrade...
1931 1931 repository locked and read-only
1932 1932 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1933 1933 (it is safe to interrupt this process any time before data migration completes)
1934 1934 downgrading from dirstate-v2 to v1
1935 1935 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1936 1936 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1937 1937 $ hg debugformat -v | grep dirstate-v2
1938 1938 dirstate-v2: no no no
1939 1939 $ hg status
1940 1940
1941 1941 $ cd ..
1942 1942
1943 1943 dirstate-v2: upgrade and downgrade from and empty repository:
1944 1944 -------------------------------------------------------------
1945 1945
1946 1946 $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty
1947 1947 $ cd dirstate-v2-empty
1948 1948 $ hg debugformat | grep dirstate-v2
1949 1949 dirstate-v2: no
1950 1950
1951 1951 upgrade
1952 1952
1953 1953 $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes
1954 1954 upgrade will perform the following actions:
1955 1955
1956 1956 requirements
1957 1957 preserved: * (glob)
1958 1958 added: dirstate-v2
1959 1959
1960 1960 dirstate-v2
1961 1961 "hg status" will be faster
1962 1962
1963 1963 no revlogs to process
1964 1964
1965 1965 beginning upgrade...
1966 1966 repository locked and read-only
1967 1967 creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1968 1968 (it is safe to interrupt this process any time before data migration completes)
1969 1969 upgrading to dirstate-v2 from v1
1970 1970 replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob)
1971 1971 removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1972 1972 $ hg debugformat | grep dirstate-v2
1973 1973 dirstate-v2: yes
1974 1974
1975 1975 downgrade
1976 1976
1977 1977 $ hg debugupgraderepo --run --config format.use-dirstate-v2=no
1978 1978 upgrade will perform the following actions:
1979 1979
1980 1980 requirements
1981 1981 preserved: * (glob)
1982 1982 removed: dirstate-v2
1983 1983
1984 1984 no revlogs to process
1985 1985
1986 1986 beginning upgrade...
1987 1987 repository locked and read-only
1988 1988 creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1989 1989 (it is safe to interrupt this process any time before data migration completes)
1990 1990 downgrading from dirstate-v2 to v1
1991 1991 replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob)
1992 1992 removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob)
1993 1993 $ hg debugformat | grep dirstate-v2
1994 1994 dirstate-v2: no
1995 1995
1996 1996 $ cd ..
1997 1997
1998 1998 Test automatic upgrade/downgrade
1999 1999 ================================
2000 2000
2001 2001
2002 2002 For dirstate v2
2003 2003 ---------------
2004 2004
2005 2005 create an initial repository
2006 2006
2007 2007 $ hg init auto-upgrade \
2008 2008 > --config format.use-dirstate-v2=no \
2009 2009 > --config format.use-dirstate-tracked-hint=yes \
2010 2010 > --config format.use-share-safe=no
2011 2011 $ hg debugbuilddag -R auto-upgrade --new-file .+5
2012 2012 $ hg -R auto-upgrade update
2013 2013 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
2014 2014 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2015 2015 dirstate-v2: no
2016 2016
2017 2017 upgrade it to dirstate-v2 automatically
2018 2018
2019 2019 $ hg status -R auto-upgrade \
2020 2020 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2021 2021 > --config format.use-dirstate-v2=yes
2022 2022 automatically upgrading repository to the `dirstate-v2` feature
2023 2023 (see `hg help config.format.use-dirstate-v2` for details)
2024 2024 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2025 2025 dirstate-v2: yes
2026 2026
2027 2027 downgrade it from dirstate-v2 automatically
2028 2028
2029 2029 $ hg status -R auto-upgrade \
2030 2030 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2031 2031 > --config format.use-dirstate-v2=no
2032 2032 automatically downgrading repository from the `dirstate-v2` feature
2033 2033 (see `hg help config.format.use-dirstate-v2` for details)
2034 2034 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2035 2035 dirstate-v2: no
2036 2036
2037 2037
2038 2038 For multiple change at the same time
2039 2039 ------------------------------------
2040 2040
2041 2041 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2042 2042 dirstate-v2: no
2043 2043 tracked-hint: yes
2044 2044 share-safe: no
2045 2045
2046 2046 $ hg status -R auto-upgrade \
2047 2047 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2048 2048 > --config format.use-dirstate-v2=yes \
2049 2049 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2050 2050 > --config format.use-dirstate-tracked-hint=no\
2051 2051 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2052 2052 > --config format.use-share-safe=yes
2053 2053 automatically upgrading repository to the `dirstate-v2` feature
2054 2054 (see `hg help config.format.use-dirstate-v2` for details)
2055 2055 automatically upgrading repository to the `share-safe` feature
2056 2056 (see `hg help config.format.use-share-safe` for details)
2057 2057 automatically downgrading repository from the `tracked-hint` feature
2058 2058 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2059 2059 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2060 2060 dirstate-v2: yes
2061 2061 tracked-hint: no
2062 2062 share-safe: yes
2063 2063
2064 2064 Quiet upgrade and downgrade
2065 2065 ---------------------------
2066 2066
2067 2067
2068 2068 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2069 2069 dirstate-v2: yes
2070 2070 tracked-hint: no
2071 2071 share-safe: yes
2072 2072 $ hg status -R auto-upgrade \
2073 2073 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2074 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2074 2075 > --config format.use-dirstate-v2=no \
2075 2076 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2076 2077 > --config format.use-dirstate-tracked-hint=yes \
2077 2078 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2078 2079 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2079 2080 > --config format.use-share-safe=no
2080 automatically downgrading repository from the `dirstate-v2` feature
2081 (see `hg help config.format.use-dirstate-v2` for details)
2082 2081 automatically upgrading repository to the `tracked-hint` feature
2083 2082 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2084 2083
2085 2084 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2086 2085 dirstate-v2: no
2087 2086 tracked-hint: yes
2088 2087 share-safe: no
2089 2088
2090 2089 $ hg status -R auto-upgrade \
2091 2090 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2091 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2092 2092 > --config format.use-dirstate-v2=yes \
2093 2093 > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \
2094 2094 > --config format.use-dirstate-tracked-hint=no\
2095 2095 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \
2096 2096 > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \
2097 2097 > --config format.use-share-safe=yes
2098 automatically upgrading repository to the `dirstate-v2` feature
2099 (see `hg help config.format.use-dirstate-v2` for details)
2100 2098 automatically downgrading repository from the `tracked-hint` feature
2101 2099 (see `hg help config.format.use-dirstate-tracked-hint` for details)
2102 2100 $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)'
2103 2101 dirstate-v2: yes
2104 2102 tracked-hint: no
2105 2103 share-safe: yes
2106 2104
2107 2105 Attempting Auto-upgrade on a read-only repository
2108 2106 -------------------------------------------------
2109 2107
2110 2108 $ chmod -R a-w auto-upgrade
2111 2109
2112 2110 $ hg status -R auto-upgrade \
2113 2111 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2114 2112 > --config format.use-dirstate-v2=no
2115 2113 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2116 2114 dirstate-v2: yes
2117 2115
2118 2116 $ chmod -R u+w auto-upgrade
2119 2117
2120 2118 Attempting Auto-upgrade on a locked repository
2121 2119 ----------------------------------------------
2122 2120
2123 2121 $ hg -R auto-upgrade debuglock --set-lock --quiet &
2124 2122 $ echo $! >> $DAEMON_PIDS
2125 2123 $ $RUNTESTDIR/testlib/wait-on-file 10 auto-upgrade/.hg/store/lock
2126 2124 $ hg status -R auto-upgrade \
2127 2125 > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \
2128 2126 > --config format.use-dirstate-v2=no
2129 2127 $ hg debugformat -R auto-upgrade | grep dirstate-v2
2130 2128 dirstate-v2: yes
2131 2129
2132 2130 $ killdaemons.py
General Comments 0
You need to be logged in to leave comments. Login now