Changeset - c082a017b366
[Not reviewed]
default
0 3 0
Andrew Bartlett - 10 years ago 2015-06-18 04:54:35
abartlet@catalyst.net.nz
git: Allow git:// URLs as a source to clone from
3 files changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils2.py
Show inline comments
 
@@ -469,7 +469,7 @@ def uri_filter(uri):
 

	
 
    proto = ''
 

	
 
    for pat in ('https://', 'http://'):
 
    for pat in ('https://', 'http://', 'git://'):
 
        if uri.startswith(pat):
 
            uri = uri[len(pat):]
 
            proto = pat
kallithea/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -174,6 +174,9 @@ class GitRepository(BaseRepository):
 
        if os.path.isdir(url) or url.startswith('file:'):
 
            return True
 

	
 
        if url.startswith('git://'):
 
            return True
 

	
 
        if '+' in url[:url.find('://')]:
 
            url = url[url.find('+') + 1:]
 

	
kallithea/model/validators.py
Show inline comments
 
@@ -458,7 +458,7 @@ def ValidCloneUri():
 

	
 
        elif repo_type == 'git':
 
            from kallithea.lib.vcs.backends.git.repository import GitRepository
 
            if url.startswith('http'):
 
            if url.startswith('http') or url.startswith('git'):
 
                # initially check if it's at least the proper URL
 
                # or does it pass basic auth
 
                GitRepository._check_url(url)
0 comments (0 inline, 0 general)