Rev 6516: trivially implement peek_lock_mode. in http://bazaar.launchpad.net/~jameinel/bzr/2.5-remote-wt-tests-1046697
John Arbash Meinel
john at arbash-meinel.com
Thu Sep 6 09:48:30 UTC 2012
At http://bazaar.launchpad.net/~jameinel/bzr/2.5-remote-wt-tests-1046697
------------------------------------------------------------
revno: 6516
revision-id: john at arbash-meinel.com-20120906094806-ds5f71k51hbgs4m2
parent: john at arbash-meinel.com-20120906094009-zgcnvlkfyds3qdr9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-remote-wt-tests-1046697
timestamp: Thu 2012-09-06 13:48:06 +0400
message:
trivially implement peek_lock_mode.
-------------- next part --------------
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2012-09-06 08:19:47 +0000
+++ b/bzrlib/remote.py 2012-09-06 09:48:06 +0000
@@ -3873,6 +3873,9 @@
target, overwrite=overwrite, stop_revision=stop_revision, lossy=lossy,
_override_hook_source_branch=self)
+ def peek_lock_mode(self):
+ return self._lock_mode
+
def is_locked(self):
return self._lock_count >= 1
=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py 2012-09-06 09:40:09 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py 2012-09-06 09:48:06 +0000
@@ -173,6 +173,7 @@
def test_lock_locks_branch(self):
tree = self.make_branch_and_tree('.')
+ self.assertEqual(None, tree.branch.peek_lock_mode())
tree.lock_read()
self.assertEqual('r', tree.branch.peek_lock_mode())
tree.unlock()
More information about the bazaar-commits
mailing list