Rev 4300: Review feedback. in http://people.ubuntu.com/~robertc/baz2.0/pending/push.roundtrips

Robert Collins robertc at robertcollins.net
Wed Apr 15 08:30:49 BST 2009


At http://people.ubuntu.com/~robertc/baz2.0/pending/push.roundtrips

------------------------------------------------------------
revno: 4300
revision-id: robertc at robertcollins.net-20090415073034-plcl46p8poz08kzb
parent: robertc at robertcollins.net-20090415053938-9w379adk8993sq1q
committer: Robert Collins <robertc at robertcollins.net>
branch nick: push.roundtrips
timestamp: Wed 2009-04-15 17:30:34 +1000
message:
  Review feedback.
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2009-04-15 05:39:38 +0000
+++ b/bzrlib/branch.py	2009-04-15 07:30:34 +0000
@@ -1930,6 +1930,7 @@
         return self.control_files.is_locked()
 
     def lock_write(self, token=None):
+        # All-in-one needs to always unlock/lock.
         repo_control = getattr(self.repository, 'control_files', None)
         if self.control_files == repo_control or not self.is_locked():
             self.repository.lock_write()
@@ -1944,6 +1945,7 @@
             raise
 
     def lock_read(self):
+        # All-in-one needs to always unlock/lock.
         repo_control = getattr(self.repository, 'control_files', None)
         if self.control_files == repo_control or not self.is_locked():
             self.repository.lock_read()
@@ -1961,6 +1963,7 @@
         try:
             self.control_files.unlock()
         finally:
+            # All-in-one needs to always unlock/lock.
             repo_control = getattr(self.repository, 'control_files', None)
             if (self.control_files == repo_control or
                 not self.control_files.is_locked()):

=== modified file 'bzrlib/tests/lock_helpers.py'
--- a/bzrlib/tests/lock_helpers.py	2009-04-15 05:39:38 +0000
+++ b/bzrlib/tests/lock_helpers.py	2009-04-15 07:30:34 +0000
@@ -46,7 +46,7 @@
 
     def __eq__(self, other):
         # Branch objects look for controlfiles == repo.controlfiles.
-        if type(other) == LockWrapper:
+        if type(other) is LockWrapper:
             return self._other == other._other
         return False
 




More information about the bazaar-commits mailing list