Commit 809dfd6d authored by eric@webkit.org's avatar eric@webkit.org

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3bdd729a
2012-01-31 Eric Seidel <eric@webkit.org>
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 <webkit.review.bot@gmail.com>
Unreviewed, rolling out r106302.
......@@ -158,7 +158,7 @@ class Checkout(object):
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)
......
......@@ -261,5 +261,5 @@ class CheckoutTest(unittest.TestCase):
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment