2009-11-25 Zoltan Horvath <zoltan@webkit.org>
authorzoltan@webkit.org <zoltan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Nov 2009 20:02:12 +0000 (20:02 +0000)
committerzoltan@webkit.org <zoltan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Nov 2009 20:02:12 +0000 (20:02 +0000)
        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
WebKitTools/Scripts/modules/scm.py
WebKitTools/Scripts/modules/scm_unittest.py

index e140f204b7a9073e86320157e21bd6abdc38df43..8df5c8288464273a997ac1e14912ce171e4da81d 100644 (file)
@@ -1,3 +1,17 @@
+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.
 2009-11-25  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Adam Barth.
index 77b3a2190b137b73852e4e67bc6b3ff76ab47bc5..ad95d26978f58d90cd85064940b70a3dbe429e3c 100644 (file)
@@ -123,7 +123,7 @@ class SCM:
         self.dryrun = dryrun
 
     @staticmethod
         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
         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 "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)])
 
     def diff_for_revision(self, revision):
         return self.run_command(['svn', 'diff', '-c', str(revision)])
index a323aff611b453582c16a8c10593e908ddaf1f30..936550c53b4fb16639b379fe823647d4fcc4c8b1 100644 (file)
@@ -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:
         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))
 
         self.assertRaises(CheckoutNeedsUpdate, commit_error_handler, ScriptError(output=git_failure_message))
         self.assertRaises(CheckoutNeedsUpdate, commit_error_handler, ScriptError(output=svn_failure_message))