Title: [106396] trunk/Tools
- Revision
- 106396
- Author
- [email protected]
- Date
- 2012-01-31 14:45:22 -0800 (Tue, 31 Jan 2012)
Log Message
webkit-patch apply-from-bug should work regardless of your CWD
https://bugs.webkit.org/show_bug.cgi?id=77482
Reviewed by Adam Barth.
webkit-patch only ever works with patches made from the root
directory. We should pass the CWD to svn-apply in the case
where we're running not from the webkit root. I believe
this used to work in the past and regressed.
* Scripts/webkitpy/common/checkout/checkout.py:
(Checkout.apply_patch):
* Scripts/webkitpy/common/checkout/checkout_unittest.py:
(CheckoutTest.test_apply_patch):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (106395 => 106396)
--- trunk/Tools/ChangeLog 2012-01-31 22:42:26 UTC (rev 106395)
+++ trunk/Tools/ChangeLog 2012-01-31 22:45:22 UTC (rev 106396)
@@ -1,3 +1,20 @@
+2012-01-31 Eric Seidel <[email protected]>
+
+ webkit-patch apply-from-bug should work regardless of your CWD
+ https://bugs.webkit.org/show_bug.cgi?id=77482
+
+ Reviewed by Adam Barth.
+
+ webkit-patch only ever works with patches made from the root
+ directory. We should pass the CWD to svn-apply in the case
+ where we're running not from the webkit root. I believe
+ this used to work in the past and regressed.
+
+ * Scripts/webkitpy/common/checkout/checkout.py:
+ (Checkout.apply_patch):
+ * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+ (CheckoutTest.test_apply_patch):
+
2012-01-31 Sheriff Bot <[email protected]>
Unreviewed, rolling out r106302.
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py (106395 => 106396)
--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py 2012-01-31 22:42:26 UTC (rev 106395)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py 2012-01-31 22:45:22 UTC (rev 106396)
@@ -158,7 +158,7 @@
args = [self._scm.script_path('svn-apply'), "--force"]
if patch.reviewer():
args += ['--reviewer', patch.reviewer().full_name]
- self._executive.run_command(args, input=patch.contents())
+ self._executive.run_command(args, input=patch.contents(), cwd=self._scm.checkout_root)
def apply_reverse_diff(self, revision):
self._scm.apply_reverse_diff(revision)
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py (106395 => 106396)
--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py 2012-01-31 22:42:26 UTC (rev 106395)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py 2012-01-31 22:45:22 UTC (rev 106396)
@@ -261,5 +261,5 @@
mock_patch = Mock()
mock_patch.contents = lambda: "foo"
mock_patch.reviewer = lambda: None
- expected_stderr = "MOCK run_command: ['svn-apply', '--force'], cwd=None\n"
+ expected_stderr = "MOCK run_command: ['svn-apply', '--force'], cwd=/mock-checkout\n"
OutputCapture().assert_outputs(self, checkout.apply_patch, [mock_patch], expected_stderr=expected_stderr)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes