Commit ea9514aa authored by tandrii's avatar tandrii Committed by Commit bot

Fix bug in git cl status and add logging.

BUG=629863
R=seanmccullough@chromium.org,andybons@chromium.org

Review-Url: https://codereview.chromium.org/2249303003
parent eefe8326
......@@ -3063,14 +3063,20 @@ def get_cl_statuses(changes, fine_grained, max_processes=None):
# Process one branch synchronously to work through authentication, then
# spawn processes to process all the other branches in parallel.
if changes:
fetch = lambda cl: (cl, cl.GetStatus())
def fetch(cl):
try:
return (cl, cl.GetStatus())
except:
# See http://crbug.com/629863.
logging.exception('failed to fetch status for %s:', cl)
raise
yield fetch(changes[0])
if not changes:
changes_to_fetch = changes[1:]
if not changes_to_fetch:
# Exit early if there was only one branch to fetch.
return
changes_to_fetch = changes[1:]
pool = ThreadPool(
min(max_processes, len(changes_to_fetch))
if max_processes is not None
......
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