changeset 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 5d8f5ad45c12
children f00ed7c5877b bff41174563f
files mercurial/httprepo.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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((