comparison doc/hgrc.5.txt @ 9624:585d2ffe969b

doc, help: stream-line use of inline-literals
author Martin Geisler <mg@lazybytes.net>
date Tue, 20 Oct 2009 22:43:17 +0200
parents ceb0f59e1327
children 24dad078603b
comparison
equal deleted inserted replaced
9623:32727ce029de 9624:585d2ffe969b
84 trusted section below for more details. 84 trusted section below for more details.
85 85
86 SYNTAX 86 SYNTAX
87 ------ 87 ------
88 88
89 A configuration file consists of sections, led by a "``[section]``" header 89 A configuration file consists of sections, led by a ``[section]`` header
90 and followed by "``name: value``" entries; "``name=value``" is also accepted. 90 and followed by ``name: value`` entries; ``name=value`` is also accepted.
91 91
92 :: 92 ::
93 93
94 [spam] 94 [spam]
95 eggs=ham 95 eggs=ham
99 Each line contains one entry. If the lines that follow are indented, 99 Each line contains one entry. If the lines that follow are indented,
100 they are treated as continuations of that entry. 100 they are treated as continuations of that entry.
101 101
102 Leading whitespace is removed from values. Empty lines are skipped. 102 Leading whitespace is removed from values. Empty lines are skipped.
103 103
104 Lines beginning with "``#``" or "``;``" are ignored and may be used to provide 104 Lines beginning with ``#`` or ``;`` are ignored and may be used to provide
105 comments. 105 comments.
106 106
107 A line of the form "``%include file``" will include ``file`` into the 107 A line of the form ``%include file`` will include ``file`` into the
108 current configuration file. The inclusion is recursive, which means 108 current configuration file. The inclusion is recursive, which means
109 that included files can include other files. Filenames are relative to 109 that included files can include other files. Filenames are relative to
110 the configuration file in which the ``%include`` directive is found. 110 the configuration file in which the ``%include`` directive is found.
111 111
112 A line with "``%unset name``" will remove ``name`` from the current 112 A line with ``%unset name`` will remove ``name`` from the current
113 section, if it has been set previously. 113 section, if it has been set previously.
114 114
115 115
116 SECTIONS 116 SECTIONS
117 -------- 117 --------
165 bar.schemes = https 165 bar.schemes = https
166 166
167 Supported arguments: 167 Supported arguments:
168 168
169 ``prefix`` 169 ``prefix``
170 Either "``*``" or a URI prefix with or without the scheme part. 170 Either ``*`` or a URI prefix with or without the scheme part.
171 The authentication entry with the longest matching prefix is used 171 The authentication entry with the longest matching prefix is used
172 (where "``*``" matches everything and counts as a match of length 172 (where ``*`` matches everything and counts as a match of length
173 1). If the prefix doesn't include a scheme, the match is performed 173 1). If the prefix doesn't include a scheme, the match is performed
174 against the URI with its scheme stripped as well, and the schemes 174 against the URI with its scheme stripped as well, and the schemes
175 argument, q.v., is then subsequently consulted. 175 argument, q.v., is then subsequently consulted.
176 ``username`` 176 ``username``
177 Optional. Username to authenticate with. If not given, and the 177 Optional. Username to authenticate with. If not given, and the
202 typically be used for newline processing or other 202 typically be used for newline processing or other
203 localization/canonicalization of files. 203 localization/canonicalization of files.
204 204
205 Filters consist of a filter pattern followed by a filter command. 205 Filters consist of a filter pattern followed by a filter command.
206 Filter patterns are globs by default, rooted at the repository root. 206 Filter patterns are globs by default, rooted at the repository root.
207 For example, to match any file ending in "``.txt``" in the root 207 For example, to match any file ending in ``.txt`` in the root
208 directory only, use the pattern "``*.txt``". To match any file ending 208 directory only, use the pattern ``*.txt``. To match any file ending
209 in "``.c``" anywhere in the repository, use the pattern "``**.c``". 209 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
210 210
211 The filter command can start with a specifier, either "pipe:" or 211 The filter command can start with a specifier, either "pipe:" or
212 "tempfile:". If no specifier is given, "pipe:" is used by default. 212 "tempfile:". If no specifier is given, "pipe:" is used by default.
213 213
214 A "pipe:" command must accept data on stdin and return the transformed 214 A "pipe:" command must accept data on stdin and return the transformed
347 347
348 Mercurial has an extension mechanism for adding new features. To 348 Mercurial has an extension mechanism for adding new features. To
349 enable an extension, create an entry for it in this section. 349 enable an extension, create an entry for it in this section.
350 350
351 If you know that the extension is already in Python's search path, 351 If you know that the extension is already in Python's search path,
352 you can give the name of the module, followed by "``=``", with nothing 352 you can give the name of the module, followed by ``=``, with nothing
353 after the "``=``". 353 after the ``=``.
354 354
355 Otherwise, give a name that you choose, followed by "``=``", followed by 355 Otherwise, give a name that you choose, followed by ``=``, followed by
356 the path to the "``.py``" file (including the file name extension) that 356 the path to the ``.py`` file (including the file name extension) that
357 defines the extension. 357 defines the extension.
358 358
359 To explicitly disable an extension that is enabled in an hgrc of 359 To explicitly disable an extension that is enabled in an hgrc of
360 broader scope, prepend its path with "``!``", as in 360 broader scope, prepend its path with ``!``, as in
361 "``hgext.foo = !/ext/path``" or "``hgext.foo = !``" when path is not 361 ``hgext.foo = !/ext/path`` or ``hgext.foo = !`` when path is not
362 supplied. 362 supplied.
363 363
364 Example for ``~/.hgrc``:: 364 Example for ``~/.hgrc``::
365 365
366 [extensions] 366 [extensions]
592 Python hooks are run within the Mercurial process. Each hook is 592 Python hooks are run within the Mercurial process. Each hook is
593 called with at least three keyword arguments: a ui object (keyword 593 called with at least three keyword arguments: a ui object (keyword
594 "ui"), a repository object (keyword "repo"), and a "hooktype" 594 "ui"), a repository object (keyword "repo"), and a "hooktype"
595 keyword that tells what kind of hook is used. Arguments listed as 595 keyword that tells what kind of hook is used. Arguments listed as
596 environment variables above are passed as keyword arguments, with no 596 environment variables above are passed as keyword arguments, with no
597 "``HG_``" prefix, and names in lower case. 597 ``HG_`` prefix, and names in lower case.
598 598
599 If a Python hook returns a "true" value or raises an exception, this 599 If a Python hook returns a "true" value or raises an exception, this
600 is treated as a failure. 600 is treated as a failure.
601 601
602 602
717 which automatically uses some safe settings, since it's common to 717 which automatically uses some safe settings, since it's common to
718 serve repositories from different users. 718 serve repositories from different users.
719 719
720 This section specifies what users and groups are trusted. The 720 This section specifies what users and groups are trusted. The
721 current user is always trusted. To trust everybody, list a user or a 721 current user is always trusted. To trust everybody, list a user or a
722 group with name "``*``". 722 group with name ``*``.
723 723
724 ``users`` 724 ``users``
725 Comma-separated list of trusted users. 725 Comma-separated list of trusted users.
726 ``groups`` 726 ``groups``
727 Comma-separated list of trusted groups. 727 Comma-separated list of trusted groups.
753 ``ignore`` 753 ``ignore``
754 A file to read per-user ignore patterns from. This file should be 754 A file to read per-user ignore patterns from. This file should be
755 in the same format as a repository-wide .hgignore file. This 755 in the same format as a repository-wide .hgignore file. This
756 option supports hook syntax, so if you want to specify multiple 756 option supports hook syntax, so if you want to specify multiple
757 ignore files, you can do so by setting something like 757 ignore files, you can do so by setting something like
758 "``ignore.other = ~/.hgignore2``". For details of the ignore file 758 ``ignore.other = ~/.hgignore2``. For details of the ignore file
759 format, see the |hgignore(5)|_ man page. 759 format, see the |hgignore(5)|_ man page.
760 ``interactive`` 760 ``interactive``
761 Allow to prompt the user. True or False. Default is True. 761 Allow to prompt the user. True or False. Default is True.
762 ``logtemplate`` 762 ``logtemplate``
763 Template string for commands that print changesets. 763 Template string for commands that print changesets.
786 remote command to use for clone/push/pull operations. Default is 'hg'. 786 remote command to use for clone/push/pull operations. Default is 'hg'.
787 ``report_untrusted`` 787 ``report_untrusted``
788 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a 788 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
789 trusted user or group. True or False. Default is True. 789 trusted user or group. True or False. Default is True.
790 ``slash`` 790 ``slash``
791 Display paths using a slash ("``/``") as the path separator. This 791 Display paths using a slash (``/``) as the path separator. This
792 only makes a difference on systems where the default path 792 only makes a difference on systems where the default path
793 separator is not the slash character (e.g. Windows uses the 793 separator is not the slash character (e.g. Windows uses the
794 backslash character ("``\``")). 794 backslash character (``\``)).
795 Default is False. 795 Default is False.
796 ``ssh`` 796 ``ssh``
797 command to use for SSH connections. Default is 'ssh'. 797 command to use for SSH connections. Default is 'ssh'.
798 ``strict`` 798 ``strict``
799 Require exact command names, instead of allowing unambiguous 799 Require exact command names, instead of allowing unambiguous
835 Default is false. 835 Default is false.
836 ``allowpull`` 836 ``allowpull``
837 Whether to allow pulling from the repository. Default is true. 837 Whether to allow pulling from the repository. Default is true.
838 ``allow_push`` 838 ``allow_push``
839 Whether to allow pushing to the repository. If empty or not set, 839 Whether to allow pushing to the repository. If empty or not set,
840 push is not allowed. If the special value "``*``", any remote user can 840 push is not allowed. If the special value ``*``, any remote user can
841 push, including unauthenticated users. Otherwise, the remote user 841 push, including unauthenticated users. Otherwise, the remote user
842 must have been authenticated, and the authenticated user name must 842 must have been authenticated, and the authenticated user name must
843 be present in this list (separated by whitespace or ","). The 843 be present in this list (separated by whitespace or ","). The
844 contents of the allow_push list are examined after the deny_push 844 contents of the allow_push list are examined after the deny_push
845 list. 845 list.
848 the contents of deny_read, this list determines whether to grant 848 the contents of deny_read, this list determines whether to grant
849 repository access to the user. If this list is not empty, and the 849 repository access to the user. If this list is not empty, and the
850 user is unauthenticated or not present in the list (separated by 850 user is unauthenticated or not present in the list (separated by
851 whitespace or ","), then access is denied for the user. If the 851 whitespace or ","), then access is denied for the user. If the
852 list is empty or not set, then access is permitted to all users by 852 list is empty or not set, then access is permitted to all users by
853 default. Setting allow_read to the special value "``*``" is equivalent 853 default. Setting allow_read to the special value ``*`` is equivalent
854 to it not being set (i.e. access is permitted to all users). The 854 to it not being set (i.e. access is permitted to all users). The
855 contents of the allow_read list are examined after the deny_read 855 contents of the allow_read list are examined after the deny_read
856 list. 856 list.
857 ``allowzip`` 857 ``allowzip``
858 (DEPRECATED) Whether to allow .zip downloading of repository 858 (DEPRECATED) Whether to allow .zip downloading of repository
864 ``contact`` 864 ``contact``
865 Name or email address of the person in charge of the repository. 865 Name or email address of the person in charge of the repository.
866 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty. 866 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
867 ``deny_push`` 867 ``deny_push``
868 Whether to deny pushing to the repository. If empty or not set, 868 Whether to deny pushing to the repository. If empty or not set,
869 push is not denied. If the special value "``*``", all remote users are 869 push is not denied. If the special value ``*``, all remote users are
870 denied push. Otherwise, unauthenticated users are all denied, and 870 denied push. Otherwise, unauthenticated users are all denied, and
871 any authenticated user name present in this list (separated by 871 any authenticated user name present in this list (separated by
872 whitespace or ",") is also denied. The contents of the deny_push 872 whitespace or ",") is also denied. The contents of the deny_push
873 list are examined before the allow_push list. 873 list are examined before the allow_push list.
874 ``deny_read`` 874 ``deny_read``
875 Whether to deny reading/viewing of the repository. If this list is 875 Whether to deny reading/viewing of the repository. If this list is
876 not empty, unauthenticated users are all denied, and any 876 not empty, unauthenticated users are all denied, and any
877 authenticated user name present in this list (separated by 877 authenticated user name present in this list (separated by
878 whitespace or ",") is also denied access to the repository. If set 878 whitespace or ",") is also denied access to the repository. If set
879 to the special value "``*``", all remote users are denied access 879 to the special value ``*``, all remote users are denied access
880 (rarely needed ;). If deny_read is empty or not set, the 880 (rarely needed ;). If deny_read is empty or not set, the
881 determination of repository access depends on the presence and 881 determination of repository access depends on the presence and
882 content of the allow_read list (see description). If both 882 content of the allow_read list (see description). If both
883 deny_read and allow_read are empty or not set, then access is 883 deny_read and allow_read are empty or not set, then access is
884 permitted to all users by default. If the repository is being 884 permitted to all users by default. If the repository is being