# HG changeset patch # User Steve Borho # Date 2011-02-13 03:53:27 # Node ID d13a533a0b11ee4380a7b0e8f7f461f5b165db78 # Parent d4ab9486e514dd24e21a2ca3b6c439ea13d85cab 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. diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -155,7 +155,7 @@ class passwordmgr(urllib2.HTTPPasswordMg 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)