httprepo: ignore environment proxies when proxies are disabled
authorSebastian Hauer <sebastian.hauer@gmail.com>
Wed, 24 Oct 2007 22:15:45 +0200
changeset 5476 b3afa6725082
parent 5474 5d8f5ad45c12
child 5477 bff41174563f
child 5491 f00ed7c5877b
httprepo: ignore environment proxies when proxies are disabled
mercurial/httprepo.py
--- a/mercurial/httprepo.py	Fri Oct 19 18:25:28 2007 -0500
+++ b/mercurial/httprepo.py	Wed Oct 24 22:15:45 2007 +0200
@@ -230,6 +230,9 @@
             # "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((