Mercurial > hg
changeset 13370:d13a533a0b11
url: use rsplit to split [auth] keys
None of the auth section subkeys include a period, so it makes zero
sense to not split from the end. By using rsplit() users can use
the hostname as group keys.
author | Steve Borho <steve@borho.org> |
---|---|
date | Sat, 12 Feb 2011 21:53:27 -0600 |
parents | d4ab9486e514 |
children | c691cfdc6b4d |
files | mercurial/url.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/url.py Thu Feb 10 13:46:28 2011 -0600 +++ b/mercurial/url.py Sat Feb 12 21:53:27 2011 -0600 @@ -155,7 +155,7 @@ if '.' not in key: self.ui.warn(_("ignoring invalid [auth] key '%s'\n") % key) continue - group, setting = key.split('.', 1) + group, setting = key.rsplit('.', 1) gdict = config.setdefault(group, dict()) if setting in ('username', 'cert', 'key'): val = util.expandpath(val)