# HG changeset patch # User Sebastian Hauer # Date 1193256945 -7200 # Node ID b3afa6725082d8e1195f4ef032f143db9866acb5 # Parent 5d8f5ad45c1260c7ec2e4ea77d8a877cd7a1db14 httprepo: ignore environment proxies when proxies are disabled diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py --- a/mercurial/httprepo.py +++ b/mercurial/httprepo.py @@ -230,6 +230,9 @@ class httprepository(remoterepository): # "http_proxy.always" config is for running tests on localhost if (not ui.configbool("http_proxy", "always") and host.lower() in no_list): + # avoid auto-detection of proxy settings by appending + # a ProxyHandler with no proxies defined. + handlers.append(urllib2.ProxyHandler({})) ui.debug(_('disabling proxy for %s\n') % host) else: proxyurl = urlparse.urlunsplit((