[PATCH] win32: allow hgrc.d on Windows
Steve Borho
steve at borho.org
Sun Feb 7 05:34:53 CST 2010
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1265542462 21600
# Node ID 14672bbd226694122d0689e85aad714f89afba70
# Parent ec02cf8d16286551cdaf7d5fec51f0ef6c5aeef2
win32: allow hgrc.d on Windows
diff -r ec02cf8d1628 -r 14672bbd2266 mercurial/win32.py
--- a/mercurial/win32.py Tue Dec 23 09:46:40 2008 -0800
+++ b/mercurial/win32.py Sun Feb 07 05:34:22 2010 -0600
@@ -131,6 +131,14 @@
progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini')
if os.path.isfile(progrc):
return [progrc]
+ # Use hgrc.d found in directory with hg.exe
+ progrcd = os.path.join(os.path.dirname(filename), 'hgrc.d')
+ if os.path.isdir(progrcd):
+ rcpath = []
+ for f, kind in osutil.listdir(progrcd):
+ if f.endswith('.rc'):
+ rcpath.append(os.path.join(progrcd, f))
+ return rcpath
# else look for a system rcpath in the registry
try:
value = win32api.RegQueryValue(
More information about the Mercurial-devel
mailing list