diff mercurial/httpconnection.py @ 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 94b200a11cf7
children a814f8fcc65a
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