git_auto_svn.py: Rewrite http SVN URLs to https

BUG=435091
TESTED=Ran the following:
git clone https://chromium.googlesource.com/external/webrtc
cd webrtc
git auto-svn
cat .git/config
Verified the URL was using http before this patch, and https after applying it.

R=agable@chromium.org, mmoss@chromium.org

Review URL: https://codereview.chromium.org/745473003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293041 0039d316-1c4b-4281-b951-d872f2087c98
changes/01/332501/1
kjellander@chromium.org 11 years ago
parent 145960c213
commit 34458d40c4

@ -83,6 +83,11 @@ def main(argv):
assert svn_repo is not None, 'Unable to find svn repo for %s' % match.group(1)
print 'Found upstream svn repo %s and path %s' % (svn_repo, svn_path)
# TODO(kjellander): Remove when WebRTC has moved to Git (crbug.com/435091)
svn_url = urlparse.urlparse(svn_repo)
if svn_url.scheme == 'http' and svn_url.hostname.endswith('googlecode.com'):
svn_repo = svn_repo.replace('http://', 'https://')
set_config('svn-remote.svn.url', svn_repo)
set_config('svn-remote.svn.fetch',
'%s:refs/remotes/%s' % (svn_path, upstream))

Loading…
Cancel
Save