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

Unified Diff: gclient.py

Issue 11088023: Fix multi-solution use case with conflicting custom_deps overrides. (Closed) Base URL: https://git.chromium.org/chromium/tools/depot_tools.git@master
Patch Set: allow empty strings in addition to None Created 8 years, 2 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 | no next file » | 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 c23b0023cfc56b21c65f152a529671c65c2e4ccb..cef9f1afcf4c8659a7595a4aa6fb69c98db70bfb 100644
--- a/gclient.py
+++ b/gclient.py
@@ -325,10 +325,20 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
# This require a full tree traversal with locks.
siblings = [d for d in self.root.subtree(False) if d.name == self.name]
for sibling in siblings:
- if self.url != sibling.url:
+ self_url = self.LateOverride(self.url)
+ sibling_url = sibling.LateOverride(sibling.url)
+ # Allow to have only one to be None or ''.
+ if self_url != sibling_url and bool(self_url) == bool(sibling_url):
raise gclient_utils.Error(
- 'Dependency %s specified more than once:\n %s\nvs\n %s' %
- (self.name, sibling.hierarchy(), self.hierarchy()))
+ ('Dependency %s specified more than once:\n'
+ ' %s [%s]\n'
+ 'vs\n'
+ ' %s [%s]') % (
+ self.name,
+ sibling.hierarchy(),
+ sibling_url,
+ self.hierarchy(),
+ self_url))
# In theory we could keep it as a shadow of the other one. In
# practice, simply ignore it.
logging.warn('Won\'t process duplicate dependency %s' % sibling)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698