|Summary:||bugzilla-tool continues execution even if subcommands fail|
|Product:||WebKit||Reporter:||Eric Seidel (no email) <eric>|
|Component:||Tools / Tests||Assignee:||Nobody <webkit-unassigned>|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
Description Eric Seidel (no email) 2009-06-23 17:24:34 PDT
bugzilla-tool continues execution even if subcommands fail I've noticed in a couple places that bugzilla-tool will continue executing even if the underlying "git svn rebase" command fails (due to a conflict for instance). This is bad, and we should make bugzilla-tool more robust against this kind of failure by throwing ScriptExceptions (that's what there designed for). That will allow the eventual land-everything-in-the-commit-queue mode to work and recover from build/update failures, while still allowing normal usage to error out correctly.
Comment 1 Eric Seidel (no email) 2009-06-23 17:25:26 PDT
Created attachment 31760 [details] Make SCM.run_command smarter and use it more --- 2 files changed, 47 insertions(+), 49 deletions(-)
Comment 2 Dimitri Glazkov (Google) 2009-06-23 17:32:38 PDT
What the heck kind of bug number is that?
Comment 3 Eric Seidel (no email) 2009-06-23 17:58:27 PDT
Clearly bugzilla-tool ate from the tree of knowledge and must now be banished from the garden of goodness.
Comment 4 David Levin 2009-06-23 18:11:08 PDT
Comment on attachment 31760 [details] Make SCM.run_command smarter and use it more Only one comment: > diff --git a/WebKitTools/Scripts/modules/scm.py b/WebKitTools/Scripts/modules/scm.py > + def run_command(command, cwd=None, input=None, raise_on_failure=True, return_exit_code=False): > + stdin = subprocess.PIPE if input else None > + process = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=stdin, shell=True, cwd=cwd) > + output = process.communicate(input).rstrip() > + exit_code = process.wait() > + if raise_on_failure and exit_code != 0: Use: if raise_on_failure and exit_code: