comparison mercurial/httpconnection.py @ 31935:566cb89050b7

httpconnection: allow a global auth.cookiefile config entry This foreshadows support for defining a cookies file.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 09 Mar 2017 22:35:10 -0800
parents 766364caae14
children 0407a51b9d8c
comparison
equal deleted inserted replaced
31934:12aca6770046 31935:566cb89050b7
67 # moved here from url.py to avoid a cycle 67 # moved here from url.py to avoid a cycle
68 def readauthforuri(ui, uri, user): 68 def readauthforuri(ui, uri, user):
69 # Read configuration 69 # Read configuration
70 groups = {} 70 groups = {}
71 for key, val in ui.configitems('auth'): 71 for key, val in ui.configitems('auth'):
72 if key in ('cookiefile',):
73 continue
74
72 if '.' not in key: 75 if '.' not in key:
73 ui.warn(_("ignoring invalid [auth] key '%s'\n") % key) 76 ui.warn(_("ignoring invalid [auth] key '%s'\n") % key)
74 continue 77 continue
75 group, setting = key.rsplit('.', 1) 78 group, setting = key.rsplit('.', 1)
76 gdict = groups.setdefault(group, {}) 79 gdict = groups.setdefault(group, {})