Show More
@@ -1331,9 +1331,13 b' class remoterepository:' | |||||
1331 | self.ui = ui |
|
1331 | self.ui = ui | |
1332 | no_list = [ "localhost", "127.0.0.1" ] |
|
1332 | no_list = [ "localhost", "127.0.0.1" ] | |
1333 | host = ui.config("http_proxy", "host") |
|
1333 | host = ui.config("http_proxy", "host") | |
|
1334 | if host is None: | |||
|
1335 | host = os.environ.get("http_proxy") | |||
1334 | user = ui.config("http_proxy", "user") |
|
1336 | user = ui.config("http_proxy", "user") | |
1335 | passwd = ui.config("http_proxy", "passwd") |
|
1337 | passwd = ui.config("http_proxy", "passwd") | |
1336 | no = ui.config("http_proxy", "no") |
|
1338 | no = ui.config("http_proxy", "no") | |
|
1339 | if no is None: | |||
|
1340 | no = os.environ.get("no_proxy") | |||
1337 | if no: |
|
1341 | if no: | |
1338 | no_list = no_list + no.split(",") |
|
1342 | no_list = no_list + no.split(",") | |
1339 |
|
1343 | |||
@@ -1346,6 +1350,9 b' class remoterepository:' | |||||
1346 |
|
1350 | |||
1347 | # Note: urllib2 takes proxy values from the environment and those will |
|
1351 | # Note: urllib2 takes proxy values from the environment and those will | |
1348 | # take precedence |
|
1352 | # take precedence | |
|
1353 | for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]: | |||
|
1354 | if os.environ.has_key(env): | |||
|
1355 | del os.environ[env] | |||
1349 |
|
1356 | |||
1350 | proxy_handler = urllib2.BaseHandler() |
|
1357 | proxy_handler = urllib2.BaseHandler() | |
1351 | if host and not no_proxy: |
|
1358 | if host and not no_proxy: |
General Comments 0
You need to be logged in to leave comments.
Login now