comparison mercurial/scmwindows.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 e3ddb4068757
children adae8928fe09
comparison
equal deleted inserted replaced
22581:c5ece02fb211 22583:23c995ed466b
38 '''return os-specific hgrc search path to the user dir''' 38 '''return os-specific hgrc search path to the user dir'''
39 home = os.path.expanduser('~') 39 home = os.path.expanduser('~')
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