mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
upload: Honor REPO_HOST_PORT_INFO environment variable
REPO_HOST_PORT_INFO can be set to 'host:port' and be used instead of the review URL given in the manifest. Change-Id: I440bdecb2c2249fe5285ec5d0c28a937b4053450 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
df5ee52050
commit
1a68dc58eb
@ -575,6 +575,16 @@ class Remote(object):
|
||||
self._review_protocol = info[0]
|
||||
self._review_host = info[1]
|
||||
self._review_port = info[2]
|
||||
elif 'REPO_HOST_PORT_INFO' in os.environ:
|
||||
info = os.environ['REPO_HOST_PORT_INFO']
|
||||
self._review_protocol = 'ssh'
|
||||
self._review_host = info.split(" ")[0]
|
||||
self._review_port = info.split(" ")[1]
|
||||
|
||||
REVIEW_CACHE[u] = (
|
||||
self._review_protocol,
|
||||
self._review_host,
|
||||
self._review_port)
|
||||
else:
|
||||
try:
|
||||
info = urllib2.urlopen(u).read()
|
||||
|
Loading…
Reference in New Issue
Block a user