##// END OF EJS Templates
hg: look up schemes using url.url
Brodie Rao -
r13823:ad179644 default
parent child Browse files
Show More
@@ -69,11 +69,8 b' schemes = {'
69 }
69 }
70
70
71 def _lookup(path):
71 def _lookup(path):
72 scheme = 'file'
72 u = url.url(path)
73 if path:
73 scheme = u.scheme or 'file'
74 c = path.find(':')
75 if c > 0:
76 scheme = path[:c]
77 thing = schemes.get(scheme) or schemes['file']
74 thing = schemes.get(scheme) or schemes['file']
78 try:
75 try:
79 return thing(path)
76 return thing(path)
@@ -68,7 +68,7 b' Issue622: hg init && hg pull -u URL does'
68 Test 'file:' uri handling:
68 Test 'file:' uri handling:
69
69
70 $ hg pull -q file://../test-doesnt-exist
70 $ hg pull -q file://../test-doesnt-exist
71 abort: repository /test-doesnt-exist not found!
71 abort: file:// URLs can only refer to localhost
72 [255]
72 [255]
73
73
74 $ hg pull -q file:../test
74 $ hg pull -q file:../test
General Comments 0
You need to be logged in to leave comments. Login now