Commit 0a2356cd authored by Joanna Wang's avatar Joanna Wang Committed by LUCI CQ

Remove redundant should_process check.

AFAICT
- the code never reaches this point because we already check should process before adding it to the queue. http://shortn/_PWFae17qw4

- this might be necessary if the value of should_process changes between adding it to the queue and running it. But I don't see that happening anywhere. should_process is only ever set and modified here: http://shortn/_eirozAoIm4 which happens during in the parent's run() before the deps get added to the queue.

The should_process check that happens at the beginning of run() was added here: https://codereview.chromium.org/3124017/diff/2001/gclient.py

The should_process check before a deps gets enqueued was added later here: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/559150/

where several should_process checks were added and I think the author just didn't realize that, while the other methods might need them, run() already had a should_process check.

Alternatively, we could remove the should_process check before enqueue-ing. But that would result in enqueuing things that we currently don't enqueue, even if we ultimately don't do anything with it.

Change-Id: Ib3be61310c09a681988baa75fd562c7596e9e044
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3721600Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
parent d9a9c407
......@@ -933,8 +933,6 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
"""Runs |command| then parse the DEPS file."""
logging.info('Dependency(%s).run()' % self.name)
assert self._file_list == []
if not self.should_process:
return
# When running runhooks, there's no need to consult the SCM.
# All known hooks are expected to run unconditionally regardless of working
# copy state, so skip the SCM status check.
......
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