/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_break_lock.py

  • Committer: Andrew Bennetts
  • Date: 2008-10-27 06:14:45 UTC
  • mfrom: (3793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3795.
  • Revision ID: andrew.bennetts@canonical.com-20081027061445-eqt9lz6uw1mbvq4g
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    def test_unlocked_repo_locked(self):
51
51
        # break lock on the branch should try on the repository even
52
52
        # if the branch isn't locked
53
 
        self.branch.repository.lock_write()
 
53
        token = self.branch.repository.lock_write()
 
54
        if token is None:
 
55
            self.branch.repository.unlock()
 
56
            raise TestNotApplicable('Repository does not use physical locks.')
 
57
        self.branch.repository.leave_lock_in_place()
 
58
        self.branch.repository.unlock()
54
59
        other_instance = self.branch.repository.bzrdir.open_repository()
55
60
        if not other_instance.get_physical_lock_status():
56
61
            raise TestNotApplicable("Repository does not lock persistently.")