Skip to content
Snippets Groups Projects
Commit e28affca authored by Sean Farley's avatar Sean Farley
Browse files

init: test for git http(s) paths

Wraps the http(s) schemes to test for a .git at the end of the url.
parent ee9017a3
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,20 @@
hg.schemes['file'] = _local
def _httpgitwrapper(orig):
# we should probably test the connection but for now, we just keep it
# simple and check for a url ending in '.git'
def httpgitscheme(uri):
if uri.endswith('.git'):
return gitrepo
return orig(uri)
return httpgitscheme
hg.schemes['https'] = _httpgitwrapper(hg.schemes['https'])
hg.schemes['http'] = _httpgitwrapper(hg.schemes['http'])
hgdefaultdest = hg.defaultdest
def defaultdest(source):
for scheme in util.gitschemes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment