comparison mercurial/scmposix.py @ 22583:23c995ed466b

config: don't read the same config file twice In some cases some config files would be read twice and shown twice in showconfig --debug.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 04 Sep 2014 21:36:35 +0200
parents 4c6f7f0dadab
children 39087ee88835
comparison
equal deleted inserted replaced
22581:c5ece02fb211 22583:23c995ed466b
19 else: 19 else:
20 root = 'etc/mercurial' 20 root = 'etc/mercurial'
21 # old mod_python does not set sys.argv 21 # old mod_python does not set sys.argv
22 if len(getattr(sys, 'argv', [])) > 0: 22 if len(getattr(sys, 'argv', [])) > 0:
23 p = os.path.dirname(os.path.dirname(sys.argv[0])) 23 p = os.path.dirname(os.path.dirname(sys.argv[0]))
24 path.extend(_rcfiles(os.path.join(p, root))) 24 if p != '/':
25 path.extend(_rcfiles(os.path.join(p, root)))
25 path.extend(_rcfiles('/' + root)) 26 path.extend(_rcfiles('/' + root))
26 return path 27 return path
27 28
28 def userrcpath(): 29 def userrcpath():
29 if sys.platform == 'plan9': 30 if sys.platform == 'plan9':