Rev 2940: Fix up mismatched lock/unlock pairs. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Oct 25 03:27:50 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2940
revision-id: pqm at pqm.ubuntu.com-20071025022746-ftudwmzir8v2lccc
parent: pqm at pqm.ubuntu.com-20071024231045-lquhgsz9513gn2l4
parent: mbp at sourcefrog.net-20071025014327-0cpg7pvqajswijsl
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-10-25 03:27:46 +0100
message:
  Fix up mismatched lock/unlock pairs.
modified:
  bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
    ------------------------------------------------------------
    revno: 2939.1.1
    merged: mbp at sourcefrog.net-20071025014327-0cpg7pvqajswijsl
    parent: pqm at pqm.ubuntu.com-20071024231045-lquhgsz9513gn2l4
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: packrepo
    timestamp: Thu 2007-10-25 11:43:27 +1000
    message:
      Fix up mismatched lock/unlock pairs.
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py	2007-10-24 06:48:13 +0000
+++ b/bzrlib/tests/test_repository.py	2007-10-25 01:43:27 +0000
@@ -975,9 +975,9 @@
                 self.assertEqual(r1._pack_collection.names(), r2._pack_collection.names())
                 self.assertEqual(2, len(r1._pack_collection.names()))
             finally:
-                r1.unlock()
+                r2.unlock()
         finally:
-            r2.unlock()
+            r1.unlock()
 
     def test_concurrent_writer_second_preserves_dropping_a_pack(self):
         format = self.get_format()
@@ -1045,9 +1045,9 @@
                 self.assertEqual(1, len(r1._pack_collection.names()))
                 self.assertFalse(name_to_drop in r1._pack_collection.names())
             finally:
-                r1.unlock()
+                r2.unlock()
         finally:
-            r2.unlock()
+            r1.unlock()
 
     def test_lock_write_does_not_physically_lock(self):
         repo = self.make_repository('.', format=self.get_format())




More information about the bazaar-commits mailing list