Merge "Changes to support sso: repositories for upload"

This commit is contained in:
Conley Owens 2014-02-04 21:19:07 +00:00 committed by Gerrit Code Review
commit 1b46cc9b6d

View File

@ -576,7 +576,7 @@ class Remote(object):
return None return None
u = self.review u = self.review
if not u.startswith('http:') and not u.startswith('https:'): if u.split(':')[0] not in ('http', 'https', 'sso'):
u = 'http://%s' % u u = 'http://%s' % u
if u.endswith('/Gerrit'): if u.endswith('/Gerrit'):
u = u[:len(u) - len('/Gerrit')] u = u[:len(u) - len('/Gerrit')]
@ -592,6 +592,9 @@ class Remote(object):
host, port = os.environ['REPO_HOST_PORT_INFO'].split() host, port = os.environ['REPO_HOST_PORT_INFO'].split()
self._review_url = self._SshReviewUrl(userEmail, host, port) self._review_url = self._SshReviewUrl(userEmail, host, port)
REVIEW_CACHE[u] = self._review_url REVIEW_CACHE[u] = self._review_url
elif u.startswith('sso:'):
self._review_url = u # Assume it's right
REVIEW_CACHE[u] = self._review_url
else: else:
try: try:
info_url = u + 'ssh_info' info_url = u + 'ssh_info'