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.
--- 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,