Commit 9a289023 authored by Paweł Hajdan, Jr's avatar Paweł Hajdan, Jr Committed by Commit Bot

gclient flatten: do not emit deps entries without a url

Otherwise it'd get stringified to "None" and make resulting DEPS invalid.

In theory we could properly serialize them to None,
but it's simpler to just skip them, since they do not affect resulting checkout.

Bug: 570091
Change-Id: Ica301e2d7e40ba4ed04527355d8f75a43456391c
Reviewed-on: https://chromium-review.googlesource.com/610150Reviewed-by: 's avatarMichael Moss <mmoss@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
parent 05bcb89b
...@@ -1764,7 +1764,8 @@ class Flattener(object): ...@@ -1764,7 +1764,8 @@ class Flattener(object):
""" """
assert dep.name not in self._deps or self._deps.get(dep.name) == dep, ( assert dep.name not in self._deps or self._deps.get(dep.name) == dep, (
dep.name, self._deps.get(dep.name)) dep.name, self._deps.get(dep.name))
self._deps[dep.name] = dep if dep.url:
self._deps[dep.name] = dep
def _flatten_dep(self, dep): def _flatten_dep(self, dep):
"""Visits a dependency in order to flatten it (see CMDflatten). """Visits a dependency in order to flatten it (see CMDflatten).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment