comparison mercurial/url.py @ 11833:7c9beccb0533

url: expand vars in all [auth] settings (issue2328)
author Martin Geisler <mg@aragost.com>
date Fri, 13 Aug 2010 10:10:11 +0200
parents 2ec346160783
children d4bfa07f269f
comparison
equal deleted inserted replaced
11832:7fa36341e7a0 11833:7c9beccb0533
154 if '.' not in key: 154 if '.' not in key:
155 self.ui.warn(_("ignoring invalid [auth] key '%s'\n") % key) 155 self.ui.warn(_("ignoring invalid [auth] key '%s'\n") % key)
156 continue 156 continue
157 group, setting = key.split('.', 1) 157 group, setting = key.split('.', 1)
158 gdict = config.setdefault(group, dict()) 158 gdict = config.setdefault(group, dict())
159 if setting in ('cert', 'key'): 159 val = util.expandpath(val)
160 val = util.expandpath(val)
161 gdict[setting] = val 160 gdict[setting] = val
162 161
163 # Find the best match 162 # Find the best match
164 scheme, hostpath = uri.split('://', 1) 163 scheme, hostpath = uri.split('://', 1)
165 bestlen = 0 164 bestlen = 0