# HG changeset patch # User Shane Holloway # Date 1171558317 25200 # Node ID 403c4ddd74bbff32ce930f1c062bccb426c863fa # Parent 49237d6ae97d3adca484d50042fe975e67086f72 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. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -799,13 +799,6 @@ if os.name == 'nt': 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 @@ else: 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 @@ def walkrepos(path): _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,