[PATCH 2 of 5] httpconnection: rename config to groups
Gregory Szorc
gregory.szorc at gmail.com
Fri Mar 10 01:41:17 EST 2017
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1489121594 28800
# Thu Mar 09 20:53:14 2017 -0800
# Node ID 7f05aef6f3056a0a258b45158a47c462bca9e3c8
# Parent 9f591a8a0600c08f2facb3447213fdcfb14fd601
httpconnection: rename config to groups
Because that is what it is.
diff --git a/mercurial/httpconnection.py b/mercurial/httpconnection.py
--- a/mercurial/httpconnection.py
+++ b/mercurial/httpconnection.py
@@ -67,13 +67,13 @@ class httpsendfile(object):
# moved here from url.py to avoid a cycle
def readauthforuri(ui, uri, user):
# Read configuration
- config = {}
+ groups = {}
for key, val in ui.configitems('auth'):
if '.' not in key:
ui.warn(_("ignoring invalid [auth] key '%s'\n") % key)
continue
group, setting = key.rsplit('.', 1)
- gdict = config.setdefault(group, {})
+ gdict = groups.setdefault(group, {})
if setting in ('username', 'cert', 'key'):
val = util.expandpath(val)
gdict[setting] = val
@@ -83,7 +83,7 @@ def readauthforuri(ui, uri, user):
bestuser = None
bestlen = 0
bestauth = None
- for group, auth in config.iteritems():
+ for group, auth in groups.iteritems():
if user and user != auth.get('username', user):
# If a username was set in the URI, the entry username
# must either match it or be unset
More information about the Mercurial-devel
mailing list