Rev 3019: Handle repositories that cannot be remotely locked in branch_implementations.test_break_lock. in http://people.ubuntu.com/~robertc/baz2.0/pack.read-locks
Robert Collins
robertc at robertcollins.net
Mon Nov 26 02:03:20 GMT 2007
At http://people.ubuntu.com/~robertc/baz2.0/pack.read-locks
------------------------------------------------------------
revno: 3019
revision-id:robertc at robertcollins.net-20071126020303-7l85pl5tw4qznb5l
parent: robertc at robertcollins.net-20071126013122-p6mtvopbu4u7w59y
committer: Robert Collins <robertc at robertcollins.net>
branch nick: pack.read-locks
timestamp: Mon 2007-11-26 13:03:03 +1100
message:
Handle repositories that cannot be remotely locked in branch_implementations.test_break_lock.
modified:
bzrlib/tests/branch_implementations/test_break_lock.py test_break_lock.py-20060504111902-9aae411dbe9aadd2
=== modified file 'bzrlib/tests/branch_implementations/test_break_lock.py'
--- a/bzrlib/tests/branch_implementations/test_break_lock.py 2007-11-01 09:52:45 +0000
+++ b/bzrlib/tests/branch_implementations/test_break_lock.py 2007-11-26 02:03:03 +0000
@@ -20,7 +20,7 @@
import bzrlib
import bzrlib.errors as errors
-from bzrlib.tests import TestCase, TestCaseWithTransport
+from bzrlib.tests import TestCase, TestCaseWithTransport, TestNotApplicable
from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
@@ -51,6 +51,9 @@
# break lock on the branch should try on the repository even
# if the branch isn't locked
self.branch.repository.lock_write()
+ other_instance = self.branch.repository.bzrdir.open_repository()
+ if not other_instance.get_physical_lock_status():
+ raise TestNotApplicable("Repository does not lock persistently.")
bzrlib.ui.ui_factory.stdin = StringIO("y\n")
try:
self.unused_branch.break_lock()
More information about the bazaar-commits
mailing list