Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 2263:2f64cbaa1e92
make reason for sys.argv change obvious in code.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Thu, 11 May 2006 09:01:32 -0700 |
parents | 3d48eb68f3ee |
children | 90b122730d32 |
comparison
equal
deleted
inserted
replaced
2262:3d48eb68f3ee | 2263:2f64cbaa1e92 |
---|---|
595 return rcs | 595 return rcs |
596 | 596 |
597 def os_rcpath(): | 597 def os_rcpath(): |
598 '''return default os-specific hgrc search path''' | 598 '''return default os-specific hgrc search path''' |
599 path = [] | 599 path = [] |
600 # old mod_python does not set sys.argv | |
600 if len(getattr(sys, 'argv', [])) > 0: | 601 if len(getattr(sys, 'argv', [])) > 0: |
601 path.extend(rcfiles(os.path.dirname(sys.argv[0]) + | 602 path.extend(rcfiles(os.path.dirname(sys.argv[0]) + |
602 '/../etc/mercurial')) | 603 '/../etc/mercurial')) |
603 path.extend(rcfiles('/etc/mercurial')) | 604 path.extend(rcfiles('/etc/mercurial')) |
604 path.append(os.path.expanduser('~/.hgrc')) | 605 path.append(os.path.expanduser('~/.hgrc')) |