mercurial/util.py
changeset 4098 c08b6af023bc
parent 4097 403c4ddd74bb
child 4134 9dc64c8414ca
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -801,7 +801,11 @@ if os.name == 'nt':
 
     def user_rcpath():
         '''return os-specific hgrc search path to the user dir'''
-        path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')]
+        try:
+            userrc = user_rcpath_win32()
+        except:
+            userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini')
+        path = [userrc]
         userprofile = os.environ.get('USERPROFILE')
         if userprofile:
             path.append(os.path.join(userprofile, 'mercurial.ini'))