| 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)
|
|
|