##// END OF EJS Templates
Read global config file /etc/mercurial/hgrc and fix reading hgrc on Windows.
Thomas Arendsen Hein -
r951:859de3eb default
parent child Browse files
Show More
@@ -273,9 +273,8 paths [NAME]::
273 Show definition of symbolic path name NAME. If no name is given, show
273 Show definition of symbolic path name NAME. If no name is given, show
274 definition of available names.
274 definition of available names.
275
275
276 Path names are defined in the [paths] section of the $HOME/.hgrc and
276 Path names are defined in the [paths] section of /etc/mercurial/hgrc
277 <repo>/.hg/hgrc configuration files. If run outside a repo, 'paths'
277 and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
278 queries only $HOME/.hgrc.
279
278
280 pull <repository path>::
279 pull <repository path>::
281 Pull changes from a remote repository to a local one.
280 Pull changes from a remote repository to a local one.
@@ -589,10 +588,11 FILES
589 seperated by spaces) that correspond to tagged versions of the repository
588 seperated by spaces) that correspond to tagged versions of the repository
590 contents.
589 contents.
591
590
592 $HOME/.hgrc, .hg/hgrc::
591 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
593 This file contains defaults and configuration. Values in .hg/hgrc
592 This file contains defaults and configuration. Values in .hg/hgrc
594 override those in .hgrc. See hgrc(5) for details of the contents
593 override those in $HOME/.hgrc, and these override settings made in the
595 and format of these files.
594 global /etc/mercurial/hgrc configuration. See hgrc(5) for details of
595 the contents and format of these files.
596
596
597 BUGS
597 BUGS
598 ----
598 ----
@@ -15,17 +15,22 aspects of its behaviour.
15 FILES
15 FILES
16 -----
16 -----
17
17
18 Mercurial reads configuration data from two files:
18 Mercurial reads configuration data from three files:
19
20 /etc/mercurial/hgrc::
21 Options in this global configuration file apply to all Mercurial
22 commands executed by any user in any directory.
19
23
20 $HOME/.hgrc::
24 $HOME/.hgrc::
21 Global configuration options that apply to all Mercurial commands,
25 Per-user configuration options that apply to all Mercurial commands,
22 no matter where they are run.
26 no matter from which directory they are run. Values in this file
27 override global settings.
23
28
24 <repo>/.hg/hgrc::
29 <repo>/.hg/hgrc::
25 Per-repository configuration options that only apply in a
30 Per-repository configuration options that only apply in a
26 particular repository. This file is not version-controlled, and
31 particular repository. This file is not version-controlled, and
27 will not get transferred during a "clone" operation. Values in
32 will not get transferred during a "clone" operation. Values in
28 this file override global values.
33 this file override global and per-user settings.
29
34
30 SYNTAX
35 SYNTAX
31 ------
36 ------
@@ -13,7 +13,8 class ui:
13 def __init__(self, verbose=False, debug=False, quiet=False,
13 def __init__(self, verbose=False, debug=False, quiet=False,
14 interactive=True):
14 interactive=True):
15 self.cdata = ConfigParser.SafeConfigParser()
15 self.cdata = ConfigParser.SafeConfigParser()
16 self.cdata.read(os.path.expanduser("~/.hgrc"))
16 self.cdata.read([os.path.normpath(hgrc) for hgrc in
17 "/etc/mercurial/hgrc", os.path.expanduser("~/.hgrc")])
17
18
18 self.quiet = self.configbool("ui", "quiet")
19 self.quiet = self.configbool("ui", "quiet")
19 self.verbose = self.configbool("ui", "verbose")
20 self.verbose = self.configbool("ui", "verbose")
General Comments 0
You need to be logged in to leave comments. Login now