##// END OF EJS Templates
git: Allow git:// URLs as a source to clone from
Andrew Bartlett -
r5190:c082a017 default
parent child Browse files
Show More
@@ -469,7 +469,7 b' def uri_filter(uri):'
469
469
470 proto = ''
470 proto = ''
471
471
472 for pat in ('https://', 'http://'):
472 for pat in ('https://', 'http://', 'git://'):
473 if uri.startswith(pat):
473 if uri.startswith(pat):
474 uri = uri[len(pat):]
474 uri = uri[len(pat):]
475 proto = pat
475 proto = pat
@@ -174,6 +174,9 b' class GitRepository(BaseRepository):'
174 if os.path.isdir(url) or url.startswith('file:'):
174 if os.path.isdir(url) or url.startswith('file:'):
175 return True
175 return True
176
176
177 if url.startswith('git://'):
178 return True
179
177 if '+' in url[:url.find('://')]:
180 if '+' in url[:url.find('://')]:
178 url = url[url.find('+') + 1:]
181 url = url[url.find('+') + 1:]
179
182
@@ -458,7 +458,7 b' def ValidCloneUri():'
458
458
459 elif repo_type == 'git':
459 elif repo_type == 'git':
460 from kallithea.lib.vcs.backends.git.repository import GitRepository
460 from kallithea.lib.vcs.backends.git.repository import GitRepository
461 if url.startswith('http'):
461 if url.startswith('http') or url.startswith('git'):
462 # initially check if it's at least the proper URL
462 # initially check if it's at least the proper URL
463 # or does it pass basic auth
463 # or does it pass basic auth
464 GitRepository._check_url(url)
464 GitRepository._check_url(url)
General Comments 0
You need to be logged in to leave comments. Login now