mercurial/util.py
changeset 2261 20cf545b4725
parent 2237 4a069064a39b
child 2262 3d48eb68f3ee
equal deleted inserted replaced
2240:56fddd98fef5 2261:20cf545b4725
   586         return rcs
   586         return rcs
   587 
   587 
   588     def os_rcpath():
   588     def os_rcpath():
   589         '''return default os-specific hgrc search path'''
   589         '''return default os-specific hgrc search path'''
   590         path = []
   590         path = []
   591         if len(sys.argv) > 0:
   591         if len(getattr(sys, 'argv', [])) > 0:
   592             path.extend(rcfiles(os.path.dirname(sys.argv[0]) +
   592             path.extend(rcfiles(os.path.dirname(sys.argv[0]) +
   593                                   '/../etc/mercurial'))
   593                                   '/../etc/mercurial'))
   594         path.extend(rcfiles('/etc/mercurial'))
   594         path.extend(rcfiles('/etc/mercurial'))
   595         path.append(os.path.expanduser('~/.hgrc'))
   595         path.append(os.path.expanduser('~/.hgrc'))
   596         path = [os.path.normpath(f) for f in path]
   596         path = [os.path.normpath(f) for f in path]