[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric at webkit.org eric at webkit.org
Wed Dec 22 14:57:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d9682e9e8356734793e502352e1eb693a17d059c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 25 23:25:51 2010 +0000

    2010-10-25  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            webkit-patch should clean up svn locks when passed --force-clean
            https://bugs.webkit.org/show_bug.cgi?id=48269
    
            * Scripts/webkitpy/common/checkout/scm.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 4a865e9..833f5a7 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-25  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        webkit-patch should clean up svn locks when passed --force-clean
+        https://bugs.webkit.org/show_bug.cgi?id=48269
+
+        * Scripts/webkitpy/common/checkout/scm.py:
+
 2010-10-25  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebKitTools/Scripts/webkitpy/common/checkout/scm.py b/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
index 5b18ea2..7e3ad4d 100644
--- a/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
+++ b/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
@@ -379,6 +379,12 @@ class SVN(SCM):
         return self.run(["svn", "diff"], cwd=self.checkout_root, decode_output=False) == ""
 
     def clean_working_directory(self):
+        # Make sure there are no locks lying around from a previously aborted svn invocation.
+        # This is slightly dangerous, as it's possible the user is running another svn process
+        # on this checkout at the same time.  However, it's much more likely that we're running
+        # under windows and svn just sucks (or the user interrupted svn and it failed to clean up).
+        self.run(["svn", "cleanup"], cwd=self.checkout_root)
+
         # svn revert -R is not as awesome as git reset --hard.
         # It will leave added files around, causing later svn update
         # calls to fail on the bots.  We make this mirror git reset --hard
@@ -432,6 +438,7 @@ class SVN(SCM):
 
     def revisions_changing_file(self, path, limit=5):
         revisions = []
+        # svn log will exit(1) (and thus self.run will raise) if the path does not exist.
         log_command = ['svn', 'log', '--quiet', '--limit=%s' % limit, path]
         for line in self.run(log_command, cwd=self.checkout_root).splitlines():
             match = re.search('^r(?P<revision>\d+) ', line)
diff --git a/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py b/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py
index 4aa5279..8af9ad5 100644
--- a/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py
@@ -760,6 +760,15 @@ Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
         self.do_test_diff_for_file()
         self.assertFalse(os.path.exists(self.bogus_dir))
 
+    def test_svn_lock(self):
+        svn_root_lock_path = ".svn/lock"
+        write_into_file_at_path(svn_root_lock_path, "", "utf-8")
+        # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here.
+        self.assertRaises(ScriptError, run_command, ['svn', 'update'])
+        self.scm.clean_working_directory()
+        self.assertFalse(os.path.exists(svn_root_lock_path))
+        run_command(['svn', 'update'])  # Should succeed and not raise.
+
 
 class GitTest(SCMTest):
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list