diff options
author | Conley Owens <cco3@android.com> | 2014-02-04 21:19:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-02-04 21:19:07 +0000 |
commit | 1b46cc9b6d366a34a37dd475730574979ff9b739 (patch) | |
tree | 45d1ba1152bd4cc49929bce9d05d8dd097442ca7 | |
parent | 2d0f508648a1e7c073bc897b645a43ee37ff2a40 (diff) | |
parent | 143d8a72495a17f8f2454fffdcc4d2599709fec5 (diff) | |
download | git-repo-1b46cc9b6d366a34a37dd475730574979ff9b739.tar.gz |
Merge "Changes to support sso: repositories for upload"
-rw-r--r-- | git_config.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git_config.py b/git_config.py index f6093a25..af09ebae 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -576,7 +576,7 @@ class Remote(object): | |||
576 | return None | 576 | return None |
577 | 577 | ||
578 | u = self.review | 578 | u = self.review |
579 | if not u.startswith('http:') and not u.startswith('https:'): | 579 | if u.split(':')[0] not in ('http', 'https', 'sso'): |
580 | u = 'http://%s' % u | 580 | u = 'http://%s' % u |
581 | if u.endswith('/Gerrit'): | 581 | if u.endswith('/Gerrit'): |
582 | u = u[:len(u) - len('/Gerrit')] | 582 | u = u[:len(u) - len('/Gerrit')] |
@@ -592,6 +592,9 @@ class Remote(object): | |||
592 | host, port = os.environ['REPO_HOST_PORT_INFO'].split() | 592 | host, port = os.environ['REPO_HOST_PORT_INFO'].split() |
593 | self._review_url = self._SshReviewUrl(userEmail, host, port) | 593 | self._review_url = self._SshReviewUrl(userEmail, host, port) |
594 | REVIEW_CACHE[u] = self._review_url | 594 | REVIEW_CACHE[u] = self._review_url |
595 | elif u.startswith('sso:'): | ||
596 | self._review_url = u # Assume it's right | ||
597 | REVIEW_CACHE[u] = self._review_url | ||
595 | else: | 598 | else: |
596 | try: | 599 | try: |
597 | info_url = u + 'ssh_info' | 600 | info_url = u + 'ssh_info' |