/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/blackbox/test_break_lock.py

  • Committer: Andrew Bennetts
  • Date: 2010-04-13 04:33:55 UTC
  • mfrom: (5147 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5149.
  • Revision ID: andrew.bennetts@canonical.com-20100413043355-lg3id0uwtju0k3zs
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Tests for lock-breaking user interface"""
18
18
 
60
60
        local_branch.bind(self.master_branch)
61
61
        checkoutdir = bzrlib.bzrdir.BzrDir.create('checkout')
62
62
        bzrlib.branch.BranchReferenceFormat().initialize(
63
 
            checkoutdir, local_branch)
 
63
            checkoutdir, target_branch=local_branch)
64
64
        self.wt = checkoutdir.create_workingtree()
65
65
 
66
66
    def test_break_lock_help(self):
70
70
 
71
71
    def test_break_lock_everything_locked(self):
72
72
        ### if everything is locked, we should be able to unlock the lot.
73
 
        # however, we dont test breaking the working tree because we 
74
 
        # cannot accurately do so right now: the dirstate lock is held 
 
73
        # however, we dont test breaking the working tree because we
 
74
        # cannot accurately do so right now: the dirstate lock is held
75
75
        # by an os lock, and we need to spawn a separate process to lock it
76
76
        # thne kill -9 it.
77
77
        # sketch of test:
85
85
        branch = bzrlib.branch.Branch.open('checkout')
86
86
        branch.lock_write()
87
87
        branch.unlock()
88
 
        # and a new instance of the master branch 
 
88
        # and a new instance of the master branch
89
89
        mb = branch.get_master_branch()
90
90
        mb.lock_write()
91
91
        mb.unlock()