From 0bdd1e2bb14270201aca97289d72c792f6314f2a Mon Sep 17 00:00:00 2001 From: "zoltan@webkit.org" Date: Wed, 25 Nov 2009 20:02:12 +0000 Subject: [PATCH 1/1] 2009-11-25 Zoltan Horvath 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 --- WebKitTools/ChangeLog | 14 ++++++++++++++ WebKitTools/Scripts/modules/scm.py | 4 ++-- WebKitTools/Scripts/modules/scm_unittest.py | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog index e140f204b7a9..8df5c8288464 100644 --- a/WebKitTools/ChangeLog +++ b/WebKitTools/ChangeLog @@ -1,3 +1,17 @@ +2009-11-25 Zoltan Horvath + + 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 Reviewed by Adam Barth. diff --git a/WebKitTools/Scripts/modules/scm.py b/WebKitTools/Scripts/modules/scm.py index 77b3a2190b13..ad95d26978f5 100644 --- a/WebKitTools/Scripts/modules/scm.py +++ b/WebKitTools/Scripts/modules/scm.py @@ -123,7 +123,7 @@ class SCM: 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 @@ -360,7 +360,7 @@ class SVN(SCM): 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)]) diff --git a/WebKitTools/Scripts/modules/scm_unittest.py b/WebKitTools/Scripts/modules/scm_unittest.py index a323aff611b4..936550c53b4f 100644 --- a/WebKitTools/Scripts/modules/scm_unittest.py +++ b/WebKitTools/Scripts/modules/scm_unittest.py @@ -154,7 +154,7 @@ svn: resource out of date; try updating 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)) -- 2.36.0