summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorSteve Pucci <spucci@google.com>2014-01-30 09:45:53 -0800
committerSteve Pucci <spucci@google.com>2014-01-31 07:39:44 -0800
commit143d8a72495a17f8f2454fffdcc4d2599709fec5 (patch)
tree275c993143ac9f8cc0f354be84f1cfbd49e37571 /git_config.py
parent5db69f3f6616ea199a7840f0602b988f8d5504b9 (diff)
downloadgit-repo-143d8a72495a17f8f2454fffdcc4d2599709fec5.tar.gz
Changes to support sso: repositories for upload
Change-Id: Iddf90d52f700a1f6462abe76d4f4a367ebb6d603
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py5
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'