Reviewed by Eric Seidel.
Change run_command to give back stderr by default
https://bugs.webkit.org/show_bug.cgi?id=31734
Change run_command to give back stderr by default.
Set run_commands's 'svn-create-patch' calling to put only the stdout into the patches.
Change the related unittest call.
* Scripts/modules/scm.py:
* Scripts/modules/scm_unittest.py:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51391
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-11-25 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Change run_command to give back stderr by default
+ https://bugs.webkit.org/show_bug.cgi?id=31734
+
+ Change run_command to give back stderr by default.
+ Set run_commands's 'svn-create-patch' calling to put only the stdout into the patches.
+ Change the related unittest call.
+
+ * Scripts/modules/scm.py:
+ * Scripts/modules/scm_unittest.py:
+
2009-11-25 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
self.dryrun = dryrun
@staticmethod
- def run_command(args, cwd=None, input=None, error_handler=default_error_handler, return_exit_code=False, return_stderr=False):
+ def run_command(args, cwd=None, input=None, error_handler=default_error_handler, return_exit_code=False, return_stderr=True):
if hasattr(input, 'read'): # Check if the input is a file.
stdin = input
string_to_communicate = None
return "svn"
def create_patch(self):
- return self.run_command(self.script_path("svn-create-patch"), cwd=self.checkout_root)
+ return self.run_command(self.script_path("svn-create-patch"), cwd=self.checkout_root, return_stderr=False)
def diff_for_revision(self, revision):
return self.run_command(['svn', 'diff', '-c', str(revision)])
command_returns_non_zero = ['/bin/sh', '--invalid-option']
self.assertRaises(ScriptError, SCM.run_command, command_returns_non_zero)
# Check if returns error text:
- self.assertTrue(SCM.run_command(command_returns_non_zero, error_handler=ignore_error, return_stderr=True))
+ self.assertTrue(SCM.run_command(command_returns_non_zero, error_handler=ignore_error))
self.assertRaises(CheckoutNeedsUpdate, commit_error_handler, ScriptError(output=git_failure_message))
self.assertRaises(CheckoutNeedsUpdate, commit_error_handler, ScriptError(output=svn_failure_message))