Commit 4baaa11c authored by Paweł Hajdan, Jr's avatar Paweł Hajdan, Jr Committed by Commit Bot

gclient: avoid adding potentially duplicate entries to work queue

The main goal is to provide a migration path, where we can add
conditional src-internal entry to src/DEPS, and have it still
work on checkouts where .gclient pulls src-internal, provided
the condition evaluates to False.

The migration path is then to remove the .gclient entry, and
at the same time flip the condition to True (e.g. by overriding
a variable).

Bug: 570091
Change-Id: I9b9850a644463ab0b1f368d65a5cd5f47cf7be97
Reviewed-on: https://chromium-review.googlesource.com/559150Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
parent d3790251
......@@ -909,7 +909,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
if self.recursion_limit:
# Parse the dependencies of this dependency.
for s in self.dependencies:
work_queue.enqueue(s)
if s.should_process:
work_queue.enqueue(s)
if command == 'recurse':
# Skip file only checkout.
......@@ -1458,7 +1459,8 @@ it or fix the checkout.
self._options.jobs, pm, ignore_requirements=ignore_requirements,
verbose=self._options.verbose)
for s in self.dependencies:
work_queue.enqueue(s)
if s.should_process:
work_queue.enqueue(s)
work_queue.flush(revision_overrides, command, args, options=self._options)
if revision_overrides:
print('Please fix your script, having invalid --revision flags will soon '
......@@ -1570,7 +1572,8 @@ it or fix the checkout.
work_queue = gclient_utils.ExecutionQueue(
self._options.jobs, None, False, verbose=self._options.verbose)
for s in self.dependencies:
work_queue.enqueue(s)
if s.should_process:
work_queue.enqueue(s)
work_queue.flush({}, None, [], options=self._options)
def GetURLAndRev(dep):
......
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