Rev 2148: All branch_implementations/test_locking tests passing. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/

Andrew Bennetts andrew.bennetts at canonical.com
Thu Mar 1 02:37:14 GMT 2007


At sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/

------------------------------------------------------------
revno: 2148
revision-id: andrew.bennetts at canonical.com-20070301023318-yz01arzlhgmgnz7g
parent: andrew.bennetts at canonical.com-20070228122704-4987oavyndsprxxw
parent: andrew.bennetts at canonical.com-20070301012234-pl8k56r5ui0orfxg
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss
timestamp: Thu 2007-03-01 13:33:18 +1100
message:
  All branch_implementations/test_locking tests passing.
modified:
  bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
  bzrlib/tests/branch_implementations/test_locking.py test_locking.py-20060707151933-tav3o2hpibwi53u4-4
    ------------------------------------------------------------
    revno: 2147.1.1
    merged: andrew.bennetts at canonical.com-20070301012234-pl8k56r5ui0orfxg
    parent: andrew.bennetts at canonical.com-20070228122704-4987oavyndsprxxw
    committer: Andrew Bennetts <andrew.bennetts at canonical.com>
    branch nick: hpss
    timestamp: Thu 2007-03-01 12:22:34 +1100
    message:
      All branch_implementations/test_locking tests passing.
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py	2007-02-28 12:22:51 +0000
+++ b/bzrlib/remote.py	2007-03-01 01:22:34 +0000
@@ -715,6 +715,12 @@
             mode = self._lock_mode
             self._lock_mode = None
             if self._real_branch is not None:
+                if not self._leave_lock:
+                    # If this RemoteBranch will remove the physical lock for the
+                    # repository, make sure the _real_branch doesn't do it
+                    # first.  (Because the _real_branch's repository is set to
+                    # be the RemoteRepository.)
+                    self._real_branch.repository.leave_lock_in_place()
                 self._real_branch.unlock()
             if mode != 'w':
                 return

=== modified file 'bzrlib/tests/branch_implementations/test_locking.py'
--- a/bzrlib/tests/branch_implementations/test_locking.py	2007-02-28 07:08:25 +0000
+++ b/bzrlib/tests/branch_implementations/test_locking.py	2007-03-01 01:22:34 +0000
@@ -418,7 +418,8 @@
         new_branch.dont_leave_lock_in_place()
         new_branch.repository.dont_leave_lock_in_place()
         new_branch.unlock()
-        # Now the branch is unlocked.  Test this by locking it (without tokens).
+        # Now the branch (and repository) is unlocked.  Test this by locking it
+        # without tokens.
         branch.lock_write()
         branch.unlock()
 




More information about the bazaar-commits mailing list