[PATCH] url: fix use of non-int port in https connections (issue1725)
Henrik Stuart
hg at hstuart.dk
Wed Jul 8 11:36:55 CDT 2009
# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1247070913 -7200
# Node ID b04534d4bd70eb886efb899e6ef8b2b5b64d7170
# Parent 196d40e7c885fa6e95f89134809b3ec7bdbca34b
url: fix use of non-int port in https connections (issue1725)
Versions of Python before 2.6 cannot automatically convert a given
port number to an integer, so we add a conversion to coerce the given
input to an int.
diff -r 196d40e7c885 -r b04534d4bd70 mercurial/url.py
--- a/mercurial/url.py Wed Jul 01 13:57:01 2009 -0500
+++ b/mercurial/url.py Wed Jul 08 18:35:13 2009 +0200
@@ -441,6 +441,7 @@
# 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]
More information about the Mercurial-devel
mailing list