Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: recipe_modules/bot_update/resources/bot_update.py

Issue 2328313002: Skip apply_gerrit rebase when there is a rebase failure (Closed)
Patch Set: Put in except not finally block Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/bot_update/resources/bot_update.py
diff --git a/recipe_modules/bot_update/resources/bot_update.py b/recipe_modules/bot_update/resources/bot_update.py
index 044f0838f266018a443ba0e1fbad58a19f3998c6..3c41332da5f18d2502dce57b7bd0b3b2926319e2 100755
--- a/recipe_modules/bot_update/resources/bot_update.py
+++ b/recipe_modules/bot_update/resources/bot_update.py
@@ -604,7 +604,11 @@ def apply_gerrit_ref(gerrit_repo, gerrit_ref, root, gerrit_reset,
try:
ok = False
git('checkout', '-b', temp_branch_name, cwd=root)
- git('rebase', base_rev, cwd=root)
+ try:
+ git('rebase', base_rev, cwd=root)
+ except SubprocessFailed:
agable 2016/09/12 21:00:16 No, because this will catch the exception and then
rmistry 2016/09/12 21:06:31 Ah true. I have no idea how to put this in the oth
rmistry 2016/09/12 21:12:39 Put in a raise.
+ # Abort the rebase since there were failures.
+ git('rebase', '--abort', cwd=root)
# Get off of the temporary branch since it can't be deleted otherwise.
cur_rev = git('rev-parse', 'HEAD', cwd=root).strip()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698