mercurial/util.py
changeset 2284 d6392a7c03dd
parent 2280 09ed44225571
child 2308 cb520d961d6a
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -536,12 +536,16 @@ if os.name == 'nt':
     def os_rcpath():
         '''return default os-specific hgrc search path'''
         path = system_rcpath()
-        path.append(os.path.join(os.path.expanduser('~'), 'mercurial.ini'))
+        path.append(user_rcpath())
         userprofile = os.environ.get('USERPROFILE')
         if userprofile:
             path.append(os.path.join(userprofile, 'mercurial.ini'))
         return path
 
+    def user_rcpath():
+         '''return os-specific hgrc search path to the user dir'''
+         return os.path.join(os.path.expanduser('~'), 'mercurial.ini')
+
     def parse_patch_output(output_line):
         """parses the output produced by patch and returns the file name"""
         pf = output_line[14:]