changeset 4097:403c4ddd74bb

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.
author Shane Holloway <shane.holloway@ieee.org>
date Thu, 15 Feb 2007 09:51:57 -0700
parents 49237d6ae97d
children c08b6af023bc
files mercurial/util.py
diffstat 1 files changed, 7 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Fri Feb 16 05:27:37 2007 -0200
+++ b/mercurial/util.py	Thu Feb 15 09:51:57 2007 -0700
@@ -799,13 +799,6 @@
         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')]
@@ -898,13 +891,6 @@
             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
@@ -1391,6 +1377,13 @@
 
 _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,