mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
Support clone bundle through persistent-http[s].
Bug: https://crbug.com/gerrit/11075 Change-Id: I367c6bfe8da47d886c017a2ac614d4ccb3f8a438
This commit is contained in:
parent
0c0e934b69
commit
3698ab7c92
14
project.py
14
project.py
@ -2217,13 +2217,17 @@ class Project(object):
|
|||||||
cmd += ['--continue-at', '%d' % (size,)]
|
cmd += ['--continue-at', '%d' % (size,)]
|
||||||
else:
|
else:
|
||||||
platform_utils.remove(tmpPath)
|
platform_utils.remove(tmpPath)
|
||||||
if 'http_proxy' in os.environ and 'darwin' == sys.platform:
|
with GetUrlCookieFile(srcUrl, quiet) as (cookiefile, proxy):
|
||||||
cmd += ['--proxy', os.environ['http_proxy']]
|
|
||||||
with GetUrlCookieFile(srcUrl, quiet) as (cookiefile, _proxy):
|
|
||||||
if cookiefile:
|
if cookiefile:
|
||||||
cmd += ['--cookie', cookiefile, '--cookie-jar', cookiefile]
|
cmd += ['--cookie', cookiefile, '--cookie-jar', cookiefile]
|
||||||
if srcUrl.startswith('persistent-'):
|
if proxy:
|
||||||
srcUrl = srcUrl[len('persistent-'):]
|
cmd += ['--proxy', proxy]
|
||||||
|
elif 'http_proxy' in os.environ and 'darwin' == sys.platform:
|
||||||
|
cmd += ['--proxy', os.environ['http_proxy']]
|
||||||
|
if srcUrl.startswith('persistent-https'):
|
||||||
|
srcUrl = 'http' + srcUrl[len('persistent-https'):]
|
||||||
|
elif srcUrl.startswith('persistent-http'):
|
||||||
|
srcUrl = 'http' + srcUrl[len('persistent-http'):]
|
||||||
cmd += [srcUrl]
|
cmd += [srcUrl]
|
||||||
|
|
||||||
if IsTrace():
|
if IsTrace():
|
||||||
|
Loading…
Reference in New Issue
Block a user