mercurial/scmutil.py
changeset 23142 c4ce077588d0
parent 22915 4d680deb0d9e
child 23259 9f4778027bc2
--- a/mercurial/scmutil.py	Sat Oct 18 21:48:38 2014 +0200
+++ b/mercurial/scmutil.py	Thu Sep 04 21:36:35 2014 +0200
@@ -495,7 +495,13 @@
 
 def osrcpath():
     '''return default os-specific hgrc search path'''
-    path = systemrcpath()
+    path = []
+    defaultpath = os.path.join(util.datapath, 'default.d')
+    if os.path.isdir(defaultpath):
+        for f, kind in osutil.listdir(defaultpath):
+            if f.endswith('.rc'):
+                path.append(os.path.join(defaultpath, f))
+    path.extend(systemrcpath())
     path.extend(userrcpath())
     path = [os.path.normpath(f) for f in path]
     return path