2010-04-27 Adam Barth <abarth@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Apr 2010 04:49:41 +0000 (04:49 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Apr 2010 04:49:41 +0000 (04:49 +0000)
        Reviewed by Eric Seidel.

        run-bindings-tests doesn't work in an SVN checkout
        https://bugs.webkit.org/show_bug.cgi?id=38225

        Previously detect_scm_system needed an absolute path for SVN.  Now we
        accept a relative path.

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

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

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

index a2d2f4b..4d67d32 100644 (file)
@@ -1,3 +1,16 @@
+2010-04-27  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        run-bindings-tests doesn't work in an SVN checkout
+        https://bugs.webkit.org/show_bug.cgi?id=38225
+
+        Previously detect_scm_system needed an absolute path for SVN.  Now we
+        accept a relative path.
+
+        * Scripts/webkitpy/common/checkout/scm.py:
+        * Scripts/webkitpy/common/checkout/scm_unittest.py:
+
 2010-04-27  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Stephanie Lewis.
index d5f985c..8a93669 100644 (file)
@@ -41,11 +41,13 @@ from webkitpy.common.system.deprecated_logging import error, log
 
 
 def detect_scm_system(path):
-    if SVN.in_working_directory(path):
-        return SVN(cwd=path)
+    absolute_path = os.path.abspath(path)
+
+    if SVN.in_working_directory(absolute_path):
+        return SVN(cwd=absolute_path)
     
-    if Git.in_working_directory(path):
-        return Git(cwd=path)
+    if Git.in_working_directory(absolute_path):
+        return Git(cwd=absolute_path)
     
     return None
 
index a4e6f16..5c6cbe2 100644 (file)
@@ -487,6 +487,12 @@ class SVNTest(SCMTest):
     def tearDown(self):
         SVNTestRepository.tear_down(self)
 
+    def test_detect_scm_system_relative_url(self):
+        scm = detect_scm_system(".")
+        # I wanted to assert that we got the right path, but there was some
+        # crazy magic with temp folder names that I couldn't figure out.
+        self.assertTrue(scm.checkout_root)
+
     def test_create_patch_is_full_patch(self):
         test_dir_path = os.path.join(self.svn_checkout_path, "test_dir2")
         os.mkdir(test_dir_path)