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
diff --git a/git_cl.py b/git_cl.py
index 6658a2f..399f9ed 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3063,14 +3063,20 @@
# 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