##// END OF EJS Templates
windows: add a global equivalent to /etc/mercurial for *.rc processing...
Matt Harbison -
r44403:1ccf340a default
parent child Browse files
Show More
@@ -75,6 +75,9 b' ones.'
75 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation)
75 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation)
76 - ``<install-dir>\hgrc.d\*.rc`` (per-installation)
76 - ``<install-dir>\hgrc.d\*.rc`` (per-installation)
77 - ``<install-dir>\Mercurial.ini`` (per-installation)
77 - ``<install-dir>\Mercurial.ini`` (per-installation)
78 - ``%PROGRAMDATA%\Mercurial\hgrc`` (per-system)
79 - ``%PROGRAMDATA%\Mercurial\Mercurial.ini`` (per-system)
80 - ``%PROGRAMDATA%\Mercurial\hgrc.d\*.rc`` (per-system)
78 - ``<internal>/*.rc`` (defaults)
81 - ``<internal>/*.rc`` (defaults)
79
82
80 .. note::
83 .. note::
@@ -38,6 +38,20 b' def systemrcpath():'
38 # Use hgrc.d found in directory with hg.exe
38 # Use hgrc.d found in directory with hg.exe
39 _processdir(os.path.join(os.path.dirname(filename), b'hgrc.d'))
39 _processdir(os.path.join(os.path.dirname(filename), b'hgrc.d'))
40
40
41 # treat a PROGRAMDATA directory as equivalent to /etc/mercurial
42 programdata = encoding.environ.get(b'PROGRAMDATA')
43 if programdata:
44 programdata = os.path.join(programdata, b'Mercurial')
45 _processdir(os.path.join(programdata, b'hgrc.d'))
46
47 ini = os.path.join(programdata, b'mercurial.ini')
48 if os.path.isfile(ini):
49 rcpath.append(ini)
50
51 ini = os.path.join(programdata, b'hgrc')
52 if os.path.isfile(ini):
53 rcpath.append(ini)
54
41 # next look for a system rcpath in the registry
55 # next look for a system rcpath in the registry
42 value = util.lookupreg(
56 value = util.lookupreg(
43 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
57 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
@@ -1,5 +1,7 b''
1 == New Features ==
1 == New Features ==
2
2
3 * Windows will process hgrc files in %PROGRAMDATA%\Mercurial\hgrc.d.
4
3
5
4 == New Experimental Features ==
6 == New Experimental Features ==
5
7
General Comments 0
You need to be logged in to leave comments. Login now