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

Unified Diff: gclient.py

Issue 2018803002: Improve diagnostic message for wrong gclient config (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Fix parens Created 4 years, 7 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 | gclient_scm.py » ('j') | 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 f1428c52bfca3f06dc85d0c4070f54b18ab72985..3569f8ebed154d6e4ddb54ac65393c7e5b6a6de8 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1233,12 +1233,19 @@ solutions = [
dep.url, self.root_dir, dep.name, self.outbuf)
actual_url = scm.GetActualRemoteURL(self._options)
if actual_url and not scm.DoesRemoteURLMatch(self._options):
+ mirror = scm.GetCacheMirror()
+ if mirror:
+ mirror_string = '%s (exists=%s)' % (mirror.mirror_path,
+ mirror.exists())
+ else:
+ mirror_string = 'not used'
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.
The .gclient file contains:
-%(expected_url)s (%(expected_scm)s)
+URL: %(expected_url)s (%(expected_scm)s)
+Cache mirror: %(mirror_string)s
The local checkout in %(checkout_path)s reports:
%(actual_url)s (%(actual_scm)s)
@@ -1250,6 +1257,7 @@ 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),
+ 'mirror_string' : mirror_string,
'actual_url': actual_url,
'actual_scm': gclient_scm.GetScmName(actual_url)})
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698