Mercurial > hg
diff mercurial/url.py @ 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 | 4e92ad05fe18 |
children | c691cfdc6b4d |
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)