Rev 2398: Update break-lock blackbox test to not break with dirstate as the default tree format. Unfortunately this slightly reduces test coverage of the UI. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/dirstate/
Robert Collins
robertc at robertcollins.net
Sun Feb 25 21:53:11 GMT 2007
At sftp://bazaar.launchpad.net/%7Ebzr/bzr/dirstate/
------------------------------------------------------------
revno: 2398
revision-id: robertc at robertcollins.net-20070225215219-xrrl2gv0hfw6ijzh
parent: john at arbash-meinel.com-20070225210822-22ll2yy3qfeo5bko
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate
timestamp: Mon 2007-02-26 08:52:19 +1100
message:
Update break-lock blackbox test to not break with dirstate as the default tree format. Unfortunately this slightly reduces test coverage of the UI.
modified:
bzrlib/tests/blackbox/test_break_lock.py test_break_lock.py-20060303014503-a90e07d38d042d1d
=== modified file 'bzrlib/tests/blackbox/test_break_lock.py'
--- a/bzrlib/tests/blackbox/test_break_lock.py 2006-09-27 22:12:53 +0000
+++ b/bzrlib/tests/blackbox/test_break_lock.py 2007-02-25 21:52:19 +0000
@@ -70,19 +70,23 @@
def test_break_lock_everything_locked(self):
### if everything is locked, we should be able to unlock the lot.
+ # however, we dont test breaking the working tree because we
+ # cannot accurately do so right now: the dirstate lock is held
+ # by an os lock, and we need to spawn a separate process to lock it
+ # thne kill -9 it.
# sketch of test:
- # lock the lot:
- self.wt.lock_write()
+ # lock most of the dir:
+ self.wt.branch.lock_write()
self.master_branch.lock_write()
# run the break-lock
# we need 5 yes's - wt, branch, repo, bound branch, bound repo.
- self.run_bzr('break-lock', 'checkout', stdin="y\ny\ny\ny\ny\n")
+ self.run_bzr('break-lock', 'checkout', stdin="y\ny\ny\ny\n")
# a new tree instance should be lockable
- wt = bzrlib.workingtree.WorkingTree.open('checkout')
- wt.lock_write()
- wt.unlock()
+ branch = bzrlib.branch.Branch.open('checkout')
+ branch.lock_write()
+ branch.unlock()
# and a new instance of the master branch
- mb = wt.branch.get_master_branch()
+ mb = branch.get_master_branch()
mb.lock_write()
mb.unlock()
self.assertRaises(errors.LockBroken, self.wt.unlock)
More information about the bazaar-commits
mailing list