Show More
@@ -72,16 +72,19 b' ones.' | |||||
72 | in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply |
|
72 | in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply | |
73 | to all Mercurial commands executed by any user in any directory. |
|
73 | to all Mercurial commands executed by any user in any directory. | |
74 |
|
74 | |||
75 |
| (Windows) `` |
|
75 | | (Windows) ``<install-dir>\Mercurial.ini`` | |
|
76 | | (Windows) ``<install-dir>\hgrc.d\*.rc`` | |||
76 | | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` |
|
77 | | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` | |
77 | | (Windows) ``<install-dir>\Mercurial.ini`` |
|
|||
78 |
|
78 | |||
79 | Per-installation/system configuration files, for the system on |
|
79 | Per-installation/system configuration files, for the system on | |
80 | which Mercurial is running. Options in these files apply to all |
|
80 | which Mercurial is running. Options in these files apply to all | |
81 | Mercurial commands executed by any user in any directory. Registry |
|
81 | Mercurial commands executed by any user in any directory. Registry | |
82 | keys contain PATH-like strings, every part of which must reference |
|
82 | keys contain PATH-like strings, every part of which must reference | |
83 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
83 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will | |
84 | be read. |
|
84 | be read. Mercurial checks each of these locations in the specified | |
|
85 | order until one or more configuration files are detected. If the | |||
|
86 | py2win32 extensions are not installed, Mercurial will only look for | |||
|
87 | site-wide configuration in ``C:\Mercurial\Mercurial.ini``. | |||
85 |
|
88 | |||
86 | Syntax |
|
89 | Syntax | |
87 | ------ |
|
90 | ------ |
@@ -131,6 +131,14 b' def system_rcpath_win32():' | |||||
131 | progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini') |
|
131 | progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini') | |
132 | if os.path.isfile(progrc): |
|
132 | if os.path.isfile(progrc): | |
133 | return [progrc] |
|
133 | return [progrc] | |
|
134 | # Use hgrc.d found in directory with hg.exe | |||
|
135 | progrcd = os.path.join(os.path.dirname(filename), 'hgrc.d') | |||
|
136 | if os.path.isdir(progrcd): | |||
|
137 | rcpath = [] | |||
|
138 | for f, kind in osutil.listdir(progrcd): | |||
|
139 | if f.endswith('.rc'): | |||
|
140 | rcpath.append(os.path.join(progrcd, f)) | |||
|
141 | return rcpath | |||
134 | # else look for a system rcpath in the registry |
|
142 | # else look for a system rcpath in the registry | |
135 | try: |
|
143 | try: | |
136 | value = win32api.RegQueryValue( |
|
144 | value = win32api.RegQueryValue( |
General Comments 0
You need to be logged in to leave comments.
Login now