Changeset 70502 in webkit


Ignore:
Timestamp:
Oct 25, 2010 4:25:51 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-10-25 Eric Seidel <eric@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:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70480 r70502  
     12010-10-25  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        webkit-patch should clean up svn locks when passed --force-clean
     6        https://bugs.webkit.org/show_bug.cgi?id=48269
     7
     8        * Scripts/webkitpy/common/checkout/scm.py:
     9
    1102010-10-25  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/WebKitTools/Scripts/webkitpy/common/checkout/scm.py

    r70437 r70502  
    380380
    381381    def clean_working_directory(self):
     382        # Make sure there are no locks lying around from a previously aborted svn invocation.
     383        # This is slightly dangerous, as it's possible the user is running another svn process
     384        # on this checkout at the same time.  However, it's much more likely that we're running
     385        # under windows and svn just sucks (or the user interrupted svn and it failed to clean up).
     386        self.run(["svn", "cleanup"], cwd=self.checkout_root)
     387
    382388        # svn revert -R is not as awesome as git reset --hard.
    383389        # It will leave added files around, causing later svn update
     
    433439    def revisions_changing_file(self, path, limit=5):
    434440        revisions = []
     441        # svn log will exit(1) (and thus self.run will raise) if the path does not exist.
    435442        log_command = ['svn', 'log', '--quiet', '--limit=%s' % limit, path]
    436443        for line in self.run(log_command, cwd=self.checkout_root).splitlines():
  • trunk/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py

    r70169 r70502  
    761761        self.assertFalse(os.path.exists(self.bogus_dir))
    762762
     763    def test_svn_lock(self):
     764        svn_root_lock_path = ".svn/lock"
     765        write_into_file_at_path(svn_root_lock_path, "", "utf-8")
     766        # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here.
     767        self.assertRaises(ScriptError, run_command, ['svn', 'update'])
     768        self.scm.clean_working_directory()
     769        self.assertFalse(os.path.exists(svn_root_lock_path))
     770        run_command(['svn', 'update'])  # Should succeed and not raise.
     771
    763772
    764773class GitTest(SCMTest):
Note: See TracChangeset for help on using the changeset viewer.