Commits

Shane Holloway  committed 403c4dd

Combined the two os_rcpath methods into a single one near rcpath in mercurial/util.py

The os_rcpath method delegates to system_rcpath and user_rcpath from the
different platform implementations.

  • Participants
  • Parent commits 49237d6

Comments (0)

Files changed (1)

File mercurial/util.py

         except:
             return [r'c:\mercurial\mercurial.ini']
 
-    def os_rcpath():
-        '''return default os-specific hgrc search path'''
-        path = system_rcpath()
-        path.extend(user_rcpath())
-        path = [os.path.normpath(f) for f in path]
-        return path
-
     def user_rcpath():
         '''return os-specific hgrc search path to the user dir'''
         path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')]
             pass
         return rcs
 
-    def os_rcpath():
-        '''return default os-specific hgrc search path'''
-        path = system_rcpath()
-        path.extend(user_rcpath())
-        path = [os.path.normpath(f) for f in path]
-        return path
-
     def system_rcpath():
         path = []
         # old mod_python does not set sys.argv
 
 _rcpath = None
 
+def os_rcpath():
+    '''return default os-specific hgrc search path'''
+    path = system_rcpath()
+    path.extend(user_rcpath())
+    path = [os.path.normpath(f) for f in path]
+    return path
+
 def rcpath():
     '''return hgrc search path. if env var HGRCPATH is set, use it.
     for each item in path, if directory, use files ending in .rc,