mercurial/url.py
changeset 9467 4c041f1ee1b4
parent 9347 d0474b184347
child 9726 430e59ff3437
equal deleted inserted replaced
9466:1214c64c592b 9467:4c041f1ee1b4
   195             proxyurl = urlparse.urlunsplit((
   195             proxyurl = urlparse.urlunsplit((
   196                 proxyscheme, netlocunsplit(proxyhost, proxyport,
   196                 proxyscheme, netlocunsplit(proxyhost, proxyport,
   197                                                 proxyuser, proxypasswd or ''),
   197                                                 proxyuser, proxypasswd or ''),
   198                 proxypath, proxyquery, proxyfrag))
   198                 proxypath, proxyquery, proxyfrag))
   199             proxies = {'http': proxyurl, 'https': proxyurl}
   199             proxies = {'http': proxyurl, 'https': proxyurl}
   200             ui.debug(_('proxying through http://%s:%s\n') %
   200             ui.debug('proxying through http://%s:%s\n' %
   201                       (proxyhost, proxyport))
   201                       (proxyhost, proxyport))
   202         else:
   202         else:
   203             proxies = {}
   203             proxies = {}
   204 
   204 
   205         # urllib2 takes proxy values from the environment and those
   205         # urllib2 takes proxy values from the environment and those
   502 
   502 
   503     passmgr = passwordmgr(ui)
   503     passmgr = passwordmgr(ui)
   504     if authinfo is not None:
   504     if authinfo is not None:
   505         passmgr.add_password(*authinfo)
   505         passmgr.add_password(*authinfo)
   506         user, passwd = authinfo[2:4]
   506         user, passwd = authinfo[2:4]
   507         ui.debug(_('http auth: user %s, password %s\n') %
   507         ui.debug('http auth: user %s, password %s\n' %
   508                  (user, passwd and '*' * len(passwd) or 'not set'))
   508                  (user, passwd and '*' * len(passwd) or 'not set'))
   509 
   509 
   510     handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
   510     handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
   511                      httpdigestauthhandler(passmgr)))
   511                      httpdigestauthhandler(passmgr)))
   512     handlers.extend([h(ui, passmgr) for h in handlerfuncs])
   512     handlers.extend([h(ui, passmgr) for h in handlerfuncs])