Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: gclient_scm.py

Issue 136863007: Gate tarball downloading based on SVN url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index c80575e0d2fae66f8a5a134443e3bd1db3d643b2..d487a841dba4494a2e7310ad6ab7a44107d2b501 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -1180,13 +1180,23 @@ class SVNWrapper(SCMWrapper):
'/chrome/trunk/src': 'gs://chromium-svn-checkout/chrome/',
'/blink/trunk': 'gs://chromium-svn-checkout/blink/',
}
+ WHITELISTED_ROOTS = [
+ 'svn://svn.chromium.org',
+ 'svn://svn-mirror.golo.chromium.org',
+ ]
if not exists:
try:
# Split out the revision number since it's not useful for us.
base_path = urlparse.urlparse(url).path.split('@')[0]
+ # Check to see if we're on a whitelisted root. We do this because
+ # only some svn servers have matching UUIDs.
+ local_parsed = urlparse.urlparse(url)
+ local_root = '%s://%s' % (local_parsed.scheme, local_parsed.netloc)
if ('CHROME_HEADLESS' in os.environ
and sys.platform == 'linux2' # TODO(hinoka): Enable for win/mac.
- and base_path in BASE_URLS):
+ and base_path in BASE_URLS
+ and local_root in WHITELISTED_ROOTS):
+
# Use a tarball for initial sync if we are on a bot.
# Get an unauthenticated gsutil instance.
gsutil = download_from_google_storage.Gsutil(
@@ -1224,8 +1234,6 @@ class SVNWrapper(SCMWrapper):
tarball_parsed = urlparse.urlparse(tarball_url)
tarball_root = '%s://%s' % (tarball_parsed.scheme,
tarball_parsed.netloc)
- local_parsed = urlparse.urlparse(url)
- local_root = '%s://%s' % (local_parsed.scheme, local_parsed.netloc)
if tarball_root != local_root:
print 'Switching repository root to %s' % local_root
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698