# HG changeset patch # User Benoit Boissinot # Date 1265828898 -3600 # Node ID 50fb1fe143ff14ef4de63c6bd31523bfc7499470 # Parent 2e8926e9cc327bebef298ae85887dca5e2f88231 url: httplib.HTTPSConnection already handles IPv6 and port parsing fine diff -r 2e8926e9cc32 -r 50fb1fe143ff mercurial/url.py --- a/mercurial/url.py Wed Feb 10 10:58:11 2010 -0800 +++ b/mercurial/url.py Wed Feb 10 20:08:18 2010 +0100 @@ -458,7 +458,7 @@ self.auth = self.pwmgr.readauthtoken(req.get_full_url()) return self.do_open(self._makeconnection, req) - def _makeconnection(self, host, port=443, *args, **kwargs): + def _makeconnection(self, host, port=None, *args, **kwargs): keyfile = None certfile = None @@ -473,13 +473,6 @@ keyfile = self.auth['key'] certfile = self.auth['cert'] - # let host port take precedence - if ':' in host and '[' not in host or ']:' in host: - host, port = host.rsplit(':', 1) - port = int(port) - if '[' in host: - host = host[1:-1] - return httpsconnection(host, port, keyfile, certfile, *args, **kwargs) # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if