repo_sync_manifest: Raise patching errors.
If PatchSeries.Apply failed with some patches, we were ignoring the
errors. Raise the first one hit, and ignore the rest.
BUG=chromium:886944
TEST=cros tryjob --cbuildbot into workspace with invalid CL.
Change-Id: I7d9e89ed4d34da66923695e0c015b3c9d21c20f2
Reviewed-on: https://chromium-review.googlesource.com/1387866
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Lann Martin <lannm@chromium.org>
diff --git a/scripts/repo_sync_manifest.py b/scripts/repo_sync_manifest.py
index 5e2f180..8d52d81 100644
--- a/scripts/repo_sync_manifest.py
+++ b/scripts/repo_sync_manifest.py
@@ -209,4 +209,9 @@
series = patch_series.PatchSeries(
path=options.repo_root, helper_pool=helper_pool, forced_manifest=None)
- series.Apply(patches)
+ _, failed_tot, failed_inflight = series.Apply(patches)
+
+ failed = failed_tot + failed_inflight
+ if failed:
+ logging.error('Failed to apply: %s', ', '.join(str(p) for p in failed))
+ return 1