WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
26666
bugzilla-tool continues execution even if subcommands fail
https://bugs.webkit.org/show_bug.cgi?id=26666
Summary
bugzilla-tool continues execution even if subcommands fail
Eric Seidel (no email)
Reported
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.
Attachments
Make SCM.run_command smarter and use it more
(8.48 KB, patch)
2009-06-23 17:25 PDT
,
Eric Seidel (no email)
levin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
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(-)
Dimitri Glazkov (Google)
Comment 2
2009-06-23 17:32:38 PDT
What the heck kind of bug number is that?
Eric Seidel (no email)
Comment 3
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.
David Levin
Comment 4
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)[0].rstrip() > + exit_code = process.wait() > + if raise_on_failure and exit_code != 0:
Use: if raise_on_failure and exit_code:
Eric Seidel (no email)
Comment 5
2009-06-23 18:31:59 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebKitTools/ChangeLog M WebKitTools/Scripts/bugzilla-tool M WebKitTools/Scripts/modules/scm.py Committed
r45026
http://trac.webkit.org/changeset/45026
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug