diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Tools/Scripts/webkitpy/tool/steps/commit.py | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/steps/commit.py')
-rw-r--r-- | Tools/Scripts/webkitpy/tool/steps/commit.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/Scripts/webkitpy/tool/steps/commit.py b/Tools/Scripts/webkitpy/tool/steps/commit.py index 9e69e7980..2f245e024 100644 --- a/Tools/Scripts/webkitpy/tool/steps/commit.py +++ b/Tools/Scripts/webkitpy/tool/steps/commit.py @@ -44,6 +44,7 @@ class Commit(AbstractStep): def options(cls): return AbstractStep.options() + [ Options.check_builders, + Options.non_interactive, ] def _commit_warning(self, error): @@ -66,6 +67,8 @@ class Commit(AbstractStep): try: self._tool.executive.run_and_throw_if_fail(self._tool.port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root) except ScriptError, e: + if self._options.non_interactive: + raise if not self._tool.user.confirm("Are you sure you want to continue?", default="n"): self._exit(1) @@ -94,12 +97,14 @@ class Commit(AbstractStep): self._state["commit_text"] = commit_text break; except AmbiguousCommitError, e: - if self._tool.user.confirm(self._commit_warning(e)): + if self._options.non_interactive or self._tool.user.confirm(self._commit_warning(e)): force_squash = True else: # This will correctly interrupt the rest of the commit process. raise ScriptError(message="Did not commit") except AuthenticationError, e: + if self._options.non_interactive: + raise ScriptError(message="Authentication required") username = self._tool.user.prompt("%s login: " % e.server_host, repeat=5) if not username: raise ScriptError("You need to specify the username on %s to perform the commit as." % e.server_host) |