changeset 15288:b3083042bdda stable

auth: fix realm handling with Python < 2.4.3 (issue2739)
author Matt Mackall <mpm@selenic.com>
date Mon, 17 Oct 2011 13:42:42 -0500
parents b3e19c355ca7
children 9cec4b24615b
files mercurial/httpconnection.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httpconnection.py	Mon Oct 17 18:01:38 2011 +0200
+++ b/mercurial/httpconnection.py	Mon Oct 17 13:42:42 2011 -0500
@@ -70,7 +70,11 @@
         gdict[setting] = val
 
     # Find the best match
-    scheme, hostpath = uri.split('://', 1)
+    if '://' in uri:
+        scheme, hostpath = uri.split('://', 1)
+    else:
+        # py2.4.1 doesn't provide the full URI
+        scheme, hostpath = 'http', uri
     bestuser = None
     bestlen = 0
     bestauth = None