comparison mercurial/httprepo.py @ 5476:b3afa6725082

httprepo: ignore environment proxies when proxies are disabled
author Sebastian Hauer <sebastian.hauer@gmail.com>
date Wed, 24 Oct 2007 22:15:45 +0200
parents 24de027551c1
children
comparison
equal deleted inserted replaced
5474:5d8f5ad45c12 5476:b3afa6725082
228 p in os.getenv("no_proxy", '').split(',') 228 p in os.getenv("no_proxy", '').split(',')
229 if p.strip()]) 229 if p.strip()])
230 # "http_proxy.always" config is for running tests on localhost 230 # "http_proxy.always" config is for running tests on localhost
231 if (not ui.configbool("http_proxy", "always") and 231 if (not ui.configbool("http_proxy", "always") and
232 host.lower() in no_list): 232 host.lower() in no_list):
233 # avoid auto-detection of proxy settings by appending
234 # a ProxyHandler with no proxies defined.
235 handlers.append(urllib2.ProxyHandler({}))
233 ui.debug(_('disabling proxy for %s\n') % host) 236 ui.debug(_('disabling proxy for %s\n') % host)
234 else: 237 else:
235 proxyurl = urlparse.urlunsplit(( 238 proxyurl = urlparse.urlunsplit((
236 proxyscheme, netlocunsplit(proxyhost, proxyport, 239 proxyscheme, netlocunsplit(proxyhost, proxyport,
237 proxyuser, proxypasswd or ''), 240 proxyuser, proxypasswd or ''),