doc/hgrc.5.txt
changeset 8776 face0d0540e6
parent 8773 bf8ff9e8a506
child 8781 385a2d94885e
equal deleted inserted replaced
8775:8e15f4afdf06 8776:face0d0540e6
    17 FILES
    17 FILES
    18 -----
    18 -----
    19 
    19 
    20 Mercurial reads configuration data from several files, if they exist.
    20 Mercurial reads configuration data from several files, if they exist.
    21 The names of these files depend on the system on which Mercurial is
    21 The names of these files depend on the system on which Mercurial is
    22 installed. `*.rc` files from a single directory are read in alphabetical
    22 installed. `\*.rc` files from a single directory are read in alphabetical
    23 order, later ones overriding earlier ones. Where multiple paths are
    23 order, later ones overriding earlier ones. Where multiple paths are
    24 given below, settings from later paths override earlier ones.
    24 given below, settings from later paths override earlier ones.
    25 
    25 
    26 (Unix) `<install-root>/etc/mercurial/hgrc.d/*.rc`::
    26 (Unix) `<install-root>/etc/mercurial/hgrc.d/\*.rc`::
    27 (Unix) `<install-root>/etc/mercurial/hgrc`::
    27 (Unix) `<install-root>/etc/mercurial/hgrc`::
    28     Per-installation configuration files, searched for in the
    28     Per-installation configuration files, searched for in the
    29     directory where Mercurial is installed. `<install-root>` is the
    29     directory where Mercurial is installed. `<install-root>` is the
    30     parent directory of the hg executable (or symlink) being run. For
    30     parent directory of the hg executable (or symlink) being run. For
    31     example, if installed in `/shared/tools/bin/hg`, Mercurial will look
    31     example, if installed in `/shared/tools/bin/hg`, Mercurial will look
    32     in `/shared/tools/etc/mercurial/hgrc`. Options in these files apply
    32     in `/shared/tools/etc/mercurial/hgrc`. Options in these files apply
    33     to all Mercurial commands executed by any user in any directory.
    33     to all Mercurial commands executed by any user in any directory.
    34 
    34 
    35 (Unix) `/etc/mercurial/hgrc.d/*.rc`::
    35 (Unix) `/etc/mercurial/hgrc.d/\*.rc`::
    36 (Unix) `/etc/mercurial/hgrc`::
    36 (Unix) `/etc/mercurial/hgrc`::
    37     Per-system configuration files, for the system on which Mercurial
    37     Per-system configuration files, for the system on which Mercurial
    38     is running. Options in these files apply to all Mercurial commands
    38     is running. Options in these files apply to all Mercurial commands
    39     executed by any user in any directory. Options in these files
    39     executed by any user in any directory. Options in these files
    40     override per-installation options.
    40     override per-installation options.
    46 (Windows) `C:\Mercurial\Mercurial.ini`::
    46 (Windows) `C:\Mercurial\Mercurial.ini`::
    47     Per-installation/system configuration files, for the system on
    47     Per-installation/system configuration files, for the system on
    48     which Mercurial is running. Options in these files apply to all
    48     which Mercurial is running. Options in these files apply to all
    49     Mercurial commands executed by any user in any directory. Registry
    49     Mercurial commands executed by any user in any directory. Registry
    50     keys contain PATH-like strings, every part of which must reference
    50     keys contain PATH-like strings, every part of which must reference
    51     a `Mercurial.ini` file or be a directory where `*.rc` files will be
    51     a `Mercurial.ini` file or be a directory where `\*.rc` files will be
    52     read.
    52     read.
    53 
    53 
    54 (Unix) `$HOME/.hgrc`::
    54 (Unix) `$HOME/.hgrc`::
    55 (Windows) `%HOME%\Mercurial.ini`::
    55 (Windows) `%HOME%\Mercurial.ini`::
    56 (Windows) `%HOME%\.hgrc`::
    56 (Windows) `%HOME%\.hgrc`::
   142     foo.schemes = http https
   142     foo.schemes = http https
   143 
   143 
   144 Supported arguments:
   144 Supported arguments:
   145 
   145 
   146   prefix;;
   146   prefix;;
   147     Either "`*`" or a URI prefix with or without the scheme part. The
   147     Either "`\*`" or a URI prefix with or without the scheme part. The
   148     authentication entry with the longest matching prefix is used
   148     authentication entry with the longest matching prefix is used
   149     (where "`*`" matches everything and counts as a match of length 1).
   149     (where "`\*`" matches everything and counts as a match of length 1).
   150     If the prefix doesn't include a scheme, the match is performed
   150     If the prefix doesn't include a scheme, the match is performed
   151     against the URI with its scheme stripped as well, and the schemes
   151     against the URI with its scheme stripped as well, and the schemes
   152     argument, q.v., is then subsequently consulted.
   152     argument, q.v., is then subsequently consulted.
   153   username;;
   153   username;;
   154     Username to authenticate with.
   154     Username to authenticate with.
   174 +
   174 +
   175 --
   175 --
   176 Filters consist of a filter pattern followed by a filter command.
   176 Filters consist of a filter pattern followed by a filter command.
   177 Filter patterns are globs by default, rooted at the repository root.
   177 Filter patterns are globs by default, rooted at the repository root.
   178 For example, to match any file ending in "`.txt`" in the root
   178 For example, to match any file ending in "`.txt`" in the root
   179 directory only, use the pattern "`*.txt`". To match any file ending in
   179 directory only, use the pattern "`\*.txt`". To match any file ending in
   180 "`.c`" anywhere in the repository, use the pattern "`**.c`".
   180 "`.c`" anywhere in the repository, use the pattern "`\*\*.c`".
   181 
   181 
   182 The filter command can start with a specifier, either "pipe:" or
   182 The filter command can start with a specifier, either "pipe:" or
   183 "tempfile:". If no specifier is given, "pipe:" is used by default.
   183 "tempfile:". If no specifier is given, "pipe:" is used by default.
   184 
   184 
   185 A "pipe:" command must accept data on stdin and return the
   185 A "pipe:" command must accept data on stdin and return the
   665   serve repositories from different users.
   665   serve repositories from different users.
   666 +
   666 +
   667 --
   667 --
   668 This section specifies what users and groups are trusted. The
   668 This section specifies what users and groups are trusted. The
   669 current user is always trusted. To trust everybody, list a user or a
   669 current user is always trusted. To trust everybody, list a user or a
   670 group with name "*".
   670 group with name "`\*`".
   671 
   671 
   672 users;;
   672 users;;
   673   Comma-separated list of trusted users.
   673   Comma-separated list of trusted users.
   674 groups;;
   674 groups;;
   675   Comma-separated list of trusted groups.
   675   Comma-separated list of trusted groups.
   782     Default is false.
   782     Default is false.
   783   allowpull;;
   783   allowpull;;
   784     Whether to allow pulling from the repository. Default is true.
   784     Whether to allow pulling from the repository. Default is true.
   785   allow_push;;
   785   allow_push;;
   786     Whether to allow pushing to the repository. If empty or not set,
   786     Whether to allow pushing to the repository. If empty or not set,
   787     push is not allowed. If the special value "*", any remote user can
   787     push is not allowed. If the special value "`\*`", any remote user can
   788     push, including unauthenticated users. Otherwise, the remote user
   788     push, including unauthenticated users. Otherwise, the remote user
   789     must have been authenticated, and the authenticated user name must
   789     must have been authenticated, and the authenticated user name must
   790     be present in this list (separated by whitespace or ","). The
   790     be present in this list (separated by whitespace or ","). The
   791     contents of the allow_push list are examined after the deny_push
   791     contents of the allow_push list are examined after the deny_push
   792     list.
   792     list.
   795     the contents of deny_read, this list determines whether to grant
   795     the contents of deny_read, this list determines whether to grant
   796     repository access to the user. If this list is not empty, and the
   796     repository access to the user. If this list is not empty, and the
   797     user is unauthenticated or not present in the list (separated by
   797     user is unauthenticated or not present in the list (separated by
   798     whitespace or ","), then access is denied for the user. If the
   798     whitespace or ","), then access is denied for the user. If the
   799     list is empty or not set, then access is permitted to all users by
   799     list is empty or not set, then access is permitted to all users by
   800     default. Setting allow_read to the special value "*" is equivalent
   800     default. Setting allow_read to the special value "`\*`" is equivalent
   801     to it not being set (i.e. access is permitted to all users). The
   801     to it not being set (i.e. access is permitted to all users). The
   802     contents of the allow_read list are examined after the deny_read
   802     contents of the allow_read list are examined after the deny_read
   803     list.
   803     list.
   804   allowzip;;
   804   allowzip;;
   805     (DEPRECATED) Whether to allow .zip downloading of repository
   805     (DEPRECATED) Whether to allow .zip downloading of repository
   811   contact;;
   811   contact;;
   812     Name or email address of the person in charge of the repository.
   812     Name or email address of the person in charge of the repository.
   813     Defaults to ui.username or `$EMAIL` or "unknown" if unset or empty.
   813     Defaults to ui.username or `$EMAIL` or "unknown" if unset or empty.
   814   deny_push;;
   814   deny_push;;
   815     Whether to deny pushing to the repository. If empty or not set,
   815     Whether to deny pushing to the repository. If empty or not set,
   816     push is not denied. If the special value "*", all remote users are
   816     push is not denied. If the special value "`\*`", all remote users are
   817     denied push. Otherwise, unauthenticated users are all denied, and
   817     denied push. Otherwise, unauthenticated users are all denied, and
   818     any authenticated user name present in this list (separated by
   818     any authenticated user name present in this list (separated by
   819     whitespace or ",") is also denied. The contents of the deny_push
   819     whitespace or ",") is also denied. The contents of the deny_push
   820     list are examined before the allow_push list.
   820     list are examined before the allow_push list.
   821   deny_read;;
   821   deny_read;;
   822     Whether to deny reading/viewing of the repository. If this list is
   822     Whether to deny reading/viewing of the repository. If this list is
   823     not empty, unauthenticated users are all denied, and any
   823     not empty, unauthenticated users are all denied, and any
   824     authenticated user name present in this list (separated by
   824     authenticated user name present in this list (separated by
   825     whitespace or ",") is also denied access to the repository. If set
   825     whitespace or ",") is also denied access to the repository. If set
   826     to the special value "*", all remote users are denied access
   826     to the special value "`\*`", all remote users are denied access
   827     (rarely needed ;). If deny_read is empty or not set, the
   827     (rarely needed ;). If deny_read is empty or not set, the
   828     determination of repository access depends on the presence and
   828     determination of repository access depends on the presence and
   829     content of the allow_read list (see description). If both
   829     content of the allow_read list (see description). If both
   830     deny_read and allow_read are empty or not set, then access is
   830     deny_read and allow_read are empty or not set, then access is
   831     permitted to all users by default. If the repository is being
   831     permitted to all users by default. If the repository is being