2011-04-07 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 08:40:16 +0000 (08:40 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 08:40:16 +0000 (08:40 +0000)
        Reviewed by Adam Barth.

        REGRESSION: "webkit-patch land" doesn't work correctly in SVN subdirectories
        https://bugs.webkit.org/show_bug.cgi?id=58017

        * Scripts/webkitpy/common/checkout/scm.py:
        * Scripts/webkitpy/common/checkout/scm_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83152 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/scm.py
Tools/Scripts/webkitpy/common/checkout/scm_unittest.py

index 2d946f7..b8ea319 100644 (file)
@@ -1,3 +1,13 @@
+2011-04-07  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Adam Barth.
+
+        REGRESSION: "webkit-patch land" doesn't work correctly in SVN subdirectories
+        https://bugs.webkit.org/show_bug.cgi?id=58017
+
+        * Scripts/webkitpy/common/checkout/scm.py:
+        * Scripts/webkitpy/common/checkout/scm_unittest.py:
+
 2011-04-06  Chang Shu  <cshu@webkit.org>
 
         Reviewed by Darin Adler.
index e436402..aa1828f 100644 (file)
@@ -577,8 +577,7 @@ class SVN(SCM):
             # Return a string which looks like a commit so that things which parse this output will succeed.
             return "Dry run, no commit.\nCommitted revision 0."
 
-        # FIXME: Should this use cwd=self.checkout_root?
-        return self.run(svn_commit_args, error_handler=commit_error_handler)
+        return self.run(svn_commit_args, cwd=self.checkout_root, error_handler=commit_error_handler)
 
     def svn_commit_log(self, svn_revision):
         svn_revision = self.strip_r_from_svn_revision(svn_revision)
index 79b354d..25b40b7 100644 (file)
@@ -650,6 +650,13 @@ Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
         commit_text = self.scm.commit_with_message("yet another test commit", username)
         self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '0')
 
+    def test_commit_in_subdir(self, username=None):
+        write_into_file_at_path('test_dir/test_file3', 'more test content')
+        os.chdir("test_dir")
+        commit_text = self.scm.commit_with_message("another test commit", username)
+        os.chdir("..")
+        self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
+
     def test_commit_text_parsing(self):
         self._shared_test_commit_with_message()