gclient: Change the .gclient URL mismatch warning into an error.

BUG=skia:1638

Review URL: https://codereview.chromium.org/208623004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259681 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
borenet@google.com 11 years ago
parent 95801c77da
commit c01bff7518

@ -1052,14 +1052,9 @@ solutions = [
scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name) scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name)
actual_url = scm.GetActualRemoteURL() actual_url = scm.GetActualRemoteURL()
if actual_url and not scm.DoesRemoteURLMatch(): if actual_url and not scm.DoesRemoteURLMatch():
gclient_utils.AddWarning(''' raise gclient_utils.Error('''
################################################################################
################################### WARNING! ###################################
################################################################################
Your .gclient file seems to be broken. The requested URL is different from what 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 is actually checked out in %(checkout_path)s.
error.
Expected: %(expected_url)s (%(expected_scm)s) Expected: %(expected_url)s (%(expected_scm)s)
Actual: %(actual_url)s (%(actual_scm)s) Actual: %(actual_url)s (%(actual_scm)s)
@ -1068,10 +1063,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 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 %(checkout_path)s but the URL in .gclient is for an svn repository, you probably
want to set 'managed': False in .gclient. want to set 'managed': False in .gclient.
################################################################################
################################################################################
################################################################################
''' % {'checkout_path': os.path.join(self.root_dir, dep.name), ''' % {'checkout_path': os.path.join(self.root_dir, dep.name),
'expected_url': dep.url, 'expected_url': dep.url,
'expected_scm': gclient_scm.GetScmName(dep.url), 'expected_scm': gclient_scm.GetScmName(dep.url),
@ -1254,6 +1245,9 @@ want to set 'managed': False in .gclient.
""" """
if not self.dependencies: if not self.dependencies:
raise gclient_utils.Error('No solution specified') raise gclient_utils.Error('No solution specified')
self._CheckConfig()
revision_overrides = {} revision_overrides = {}
# It's unnecessary to check for revision overrides for 'recurse'. # It's unnecessary to check for revision overrides for 'recurse'.
# Save a few seconds by not calling _EnforceRevisions() in that case. # Save a few seconds by not calling _EnforceRevisions() in that case.
@ -1328,7 +1322,6 @@ want to set 'managed': False in .gclient.
gclient_utils.rmtree(e_dir) gclient_utils.rmtree(e_dir)
# record the current list of entries for next time # record the current list of entries for next time
self._SaveEntries() self._SaveEntries()
self._CheckConfig()
return 0 return 0
def PrintRevInfo(self): def PrintRevInfo(self):

Loading…
Cancel
Save