From 34458d40c444d9e3671fa1b6db18eb43f205e26d Mon Sep 17 00:00:00 2001 From: "kjellander@chromium.org" Date: Thu, 20 Nov 2014 19:45:46 +0000 Subject: [PATCH] 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 --- git_auto_svn.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git_auto_svn.py b/git_auto_svn.py index 4faa9a0d5..d3a966a21 100755 --- a/git_auto_svn.py +++ b/git_auto_svn.py @@ -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))