From 0a42737b634df89c132489693b14b37a5bc60a11 Mon Sep 17 00:00:00 2001 From: "borenet@google.com" Date: Wed, 2 Apr 2014 19:12:13 +0000 Subject: [PATCH] Revert of Revert "gclient: Change the .gclient URL mismatch warning into an error." (https://codereview.chromium.org/213483003/) Reason for revert: Re-landing this after https://codereview.chromium.org/214813002/ Original issue's description: > Revert "gclient: Change the .gclient URL mismatch warning into an error." > > This reverts commit c01bff751856165467bd67abb3757a701deaa375. > > BUG=356881 > TBR=iannucci > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259727 TBR=iannucci@chromium.org,smut@google.com NOTREECHECKS=true NOTRY=true BUG=356881 Review URL: https://codereview.chromium.org/221423004 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@261158 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/gclient.py b/gclient.py index 4db8e0d1f..23f51dbef 100755 --- a/gclient.py +++ b/gclient.py @@ -1053,14 +1053,9 @@ solutions = [ scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name) actual_url = scm.GetActualRemoteURL() if actual_url and not scm.DoesRemoteURLMatch(): - gclient_utils.AddWarning(''' -################################################################################ -################################### WARNING! ################################### -################################################################################ - + raise gclient_utils.Error(''' Your .gclient file seems to be broken. The requested URL is different from what -is actually checked out in %(checkout_path)s. In the future this will be an -error. +is actually checked out in %(checkout_path)s. Expected: %(expected_url)s (%(expected_scm)s) Actual: %(actual_url)s (%(actual_scm)s) @@ -1069,10 +1064,6 @@ 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), @@ -1255,6 +1246,9 @@ 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. @@ -1329,7 +1323,6 @@ 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):