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

Unified Diff: gclient.py

Issue 213483003: Revert "gclient: Change the .gclient URL mismatch warning into an error." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 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.py
diff --git a/gclient.py b/gclient.py
index 208a4319d54e50cf0b775cebdd928296e804eee5..7a13a5d525ed0572caef62ac3742aa217e21e836 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1052,9 +1052,14 @@ solutions = [
scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name)
actual_url = scm.GetActualRemoteURL()
if actual_url and not scm.DoesRemoteURLMatch():
- raise gclient_utils.Error('''
+ gclient_utils.AddWarning('''
+################################################################################
+################################### WARNING! ###################################
+################################################################################
+
Your .gclient file seems to be broken. The requested URL is different from what
-is actually checked out in %(checkout_path)s.
+is actually checked out in %(checkout_path)s. In the future this will be an
+error.
Expected: %(expected_url)s (%(expected_scm)s)
Actual: %(actual_url)s (%(actual_scm)s)
@@ -1063,6 +1068,10 @@ You should ensure that the URL listed in .gclient is correct and either change
it or fix the checkout. If you're managing your own git checkout in
%(checkout_path)s but the URL in .gclient is for an svn repository, you probably
want to set 'managed': False in .gclient.
+
+################################################################################
+################################################################################
+################################################################################
''' % {'checkout_path': os.path.join(self.root_dir, dep.name),
'expected_url': dep.url,
'expected_scm': gclient_scm.GetScmName(dep.url),
@@ -1245,9 +1254,6 @@ want to set 'managed': False in .gclient.
"""
if not self.dependencies:
raise gclient_utils.Error('No solution specified')
-
- self._CheckConfig()
-
revision_overrides = {}
# It's unnecessary to check for revision overrides for 'recurse'.
# Save a few seconds by not calling _EnforceRevisions() in that case.
@@ -1322,6 +1328,7 @@ want to set 'managed': False in .gclient.
gclient_utils.rmtree(e_dir)
# record the current list of entries for next time
self._SaveEntries()
+ self._CheckConfig()
return 0
def PrintRevInfo(self):
« 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