# HG changeset patch # User Wolfgang Treutterer # Date 2012-04-13 08:08:08 # Node ID e98460f6089d0952c47a498bb5542792985ce408 # Parent df347129305d72d3e9958392d35ed1953df1f0d7 scmutil: fix systemrcpath regression introduced in f5dd179bfa4a Changeset f5dd179bfa4a introduced a 'root' path component to look for hgrc files, which is used both as an absolute path and a path relative to the . The latter one was broken since 'root' was set to an absolute location and the subsequent os.path.join discarded the path prefix. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -437,14 +437,14 @@ if os.name != 'nt': def systemrcpath(): path = [] if sys.platform == 'plan9': - root = '/lib/mercurial' + root = 'lib/mercurial' else: - root = '/etc/mercurial' + root = 'etc/mercurial' # old mod_python does not set sys.argv if len(getattr(sys, 'argv', [])) > 0: p = os.path.dirname(os.path.dirname(sys.argv[0])) path.extend(rcfiles(os.path.join(p, root))) - path.extend(rcfiles(root)) + path.extend(rcfiles('/' + root)) return path def userrcpath():