Recipe to have it work:
As mentionned earlier, urllib2/httplib do not support it, and a patch is
provided here:
http://bugs.python.org/issue1424152
Apply it.
but mercurial overloads some of the logic, and a part of the patch must be
reported there, so apply this one too:
# HG changeset patch
# User Phil <phil@secdev.org>
# Date 1214998663 -7200
# Node ID 06270abc1d2dbe81c9caa590779209f5d3ba808d
# Parent e81d2bd669088aa22e3437c610d216500ffeb02c
Code to support https connections through proxy
urllib2/httplib does not support those connections. A patch
is proposed here:
http://bugs.python.org/issue1424152
Because Mercurial overloads some parts of urllib2, a part
of the patch must be transfered to the overloading mercurial code.
diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -237,6 +237,8 @@
else:
# no (working) free connections were found. Create a new one.
h = http_class(host)
+ if req._tunnel_host:
+ h.set_tunnel(req._tunnel_host)
if DEBUG: DEBUG.info("creating new connection to %s (%d)",
host, id(h))
self._cm.add(host, h, 0)
|