From 979809d0601f1c55714b293d10cf844ec15c6847 Mon Sep 17 00:00:00 2001 From: "smut@google.com" Date: Wed, 26 Mar 2014 22:36:03 +0000 Subject: [PATCH] Revert "gclient: Change the .gclient URL mismatch warning into an error." This reverts commit c01bff751856165467bd67abb3757a701deaa375. BUG=356881 TBR=iannucci Review URL: https://codereview.chromium.org/213483003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259727 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gclient.py b/gclient.py index 208a4319d..7a13a5d52 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):