##// END OF EJS Templates
config: don't read the same config file twice...
Mads Kiilerich -
r22583:23c995ed default
parent child Browse files
Show More
@@ -21,7 +21,8 b' def systemrcpath():'
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
@@ -40,7 +40,7 b' def userrcpath():'
40 path = [os.path.join(home, 'mercurial.ini'),
40 path = [os.path.join(home, 'mercurial.ini'),
41 os.path.join(home, '.hgrc')]
41 os.path.join(home, '.hgrc')]
42 userprofile = os.environ.get('USERPROFILE')
42 userprofile = os.environ.get('USERPROFILE')
43 if userprofile:
43 if userprofile and userprofile != home:
44 path.append(os.path.join(userprofile, 'mercurial.ini'))
44 path.append(os.path.join(userprofile, 'mercurial.ini'))
45 path.append(os.path.join(userprofile, '.hgrc'))
45 path.append(os.path.join(userprofile, '.hgrc'))
46 return path
46 return path
General Comments 0
You need to be logged in to leave comments. Login now