Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 1635:ae61937c61c5
Fix rcpath for hgwebdir case (sys.argv is empty)
author | efiring@manini.soest.hawaii.edu |
---|---|
date | Tue, 24 Jan 2006 13:59:11 +1300 |
parents | 301d5cd4abc6 |
children | 7596611ab3d5 b0f6af327fd4 e4abeafd6eb1 |
line wrap: on
line diff
--- a/mercurial/util.py Tue Jan 24 13:59:01 2006 +1300 +++ b/mercurial/util.py Tue Jan 24 13:59:11 2006 +1300 @@ -544,7 +544,9 @@ if f.endswith(".rc")]) except OSError, inst: pass return rcs - rcpath = rcfiles(os.path.dirname(sys.argv[0]) + '/../etc/mercurial') + rcpath = [] + if len(sys.argv) > 0: + rcpath.extend(rcfiles(os.path.dirname(sys.argv[0]) + '/../etc/mercurial')) rcpath.extend(rcfiles('/etc/mercurial')) rcpath.append(os.path.expanduser('~/.hgrc')) rcpath = [os.path.normpath(f) for f in rcpath]