AC-432, AC-437. Updated SCM URL validation, add additional tests for SSH URLs.

This commit is contained in:
Chris Church
2013-09-12 03:07:21 -04:00
parent e42d408750
commit 9ea649050a
5 changed files with 159 additions and 37 deletions

View File

@@ -141,6 +141,8 @@ def update_scm_url(scm_type, url, username=True, password=True):
# svn: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.advanced.reposurls
if scm_type not in ('git', 'hg', 'svn'):
raise ValueError('unsupported SCM type "%s"' % str(scm_type))
if not url.strip():
return ''
parts = urlparse.urlsplit(url)
#print parts
if '://' not in url: