diff mercurial/hg.py @ 13823:ad179644750f

hg: look up schemes using url.url
author Brodie Rao <brodie@bitheap.org>
date Wed, 30 Mar 2011 20:02:07 -0700 (2011-03-31)
parents 43b5fe18ea6c
children ec1695350361
line wrap: on
line diff
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -69,11 +69,8 @@
 }
 
 def _lookup(path):
-    scheme = 'file'
-    if path:
-        c = path.find(':')
-        if c > 0:
-            scheme = path[:c]
+    u = url.url(path)
+    scheme = u.scheme or 'file'
     thing = schemes.get(scheme) or schemes['file']
     try:
         return thing(path)