##// END OF EJS Templates
validators: fixed problems with new mercurial/git url validators.
marcink -
r2853:b79a1f78 stable
parent child Browse files
Show More
@@ -89,7 +89,7 b' def url_validator(url, repo_type, config'
89 # initially check if it's at least the proper URL
89 # initially check if it's at least the proper URL
90 # or does it pass basic auth
90 # or does it pass basic auth
91
91
92 MercurialRepository.check_url(url, config)
92 return MercurialRepository.check_url(url, config)
93 elif 'svn+http' in url[:8]: # svn->hg import
93 elif 'svn+http' in url[:8]: # svn->hg import
94 SubversionRepository.check_url(url, config)
94 SubversionRepository.check_url(url, config)
95 elif 'git+http' in url[:8]: # git->hg import
95 elif 'git+http' in url[:8]: # git->hg import
@@ -106,7 +106,7 b' def url_validator(url, repo_type, config'
106 if 'http' in url[:4]:
106 if 'http' in url[:4]:
107 # initially check if it's at least the proper URL
107 # initially check if it's at least the proper URL
108 # or does it pass basic auth
108 # or does it pass basic auth
109 GitRepository.check_url(url, config)
109 return GitRepository.check_url(url, config)
110 elif 'svn+http' in url[:8]: # svn->git import
110 elif 'svn+http' in url[:8]: # svn->git import
111 raise NotImplementedError()
111 raise NotImplementedError()
112 elif 'hg+http' in url[:8]: # hg->git import
112 elif 'hg+http' in url[:8]: # hg->git import
@@ -121,7 +121,7 b' def url_validator(url, repo_type, config'
121 # no validation for SVN yet
121 # no validation for SVN yet
122 return
122 return
123
123
124 raise InvalidCloneUrl('No repo type specified')
124 raise InvalidCloneUrl('Invalid repo type specified: `{}`'.format(repo_type))
125
125
126
126
127 class CloneUriValidator(object):
127 class CloneUriValidator(object):
General Comments 0
You need to be logged in to leave comments. Login now