[gclient] more verbose exception
This CL shows bit more detail of value collision.
Change-Id: I612f1a80cf160e7eebb2b48f0ddd1b8f9aaa81b1
Reviewed-on: https://chromium-review.googlesource.com/c/1475265
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/gclient.py b/gclient.py
index cbfb778..07bf2f5 100755
--- a/gclient.py
+++ b/gclient.py
@@ -2157,7 +2157,9 @@
for key, value in dep._vars.iteritems():
# Make sure there are no conflicting variables. It is fine however
# to use same variable name, as long as the value is consistent.
- assert key not in self._vars or self._vars[key][1] == value
+ assert key not in self._vars or self._vars[key][1] == value, (
+ "dep:%s key:%s value:%s != %s" % (
+ dep.name, key, value, self._vars[key][1]))
self._vars[key] = (hierarchy, value)
# Override explicit custom variables.
for key, value in dep.custom_vars.iteritems():