Rev 6240: (jelmer) Fix development-colo to put its lock directory in .bzr/, in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Fri Nov 4 18:52:28 UTC 2011


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6240 [merge]
revision-id: pqm at pqm.ubuntu.com-20111104185227-fe7stgvmq3ehl6k3
parent: pqm at pqm.ubuntu.com-20111104135733-zx3l8f316wyk48ek
parent: jelmer at samba.org-20111104163200-4aelx03tugdhhipf
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2011-11-04 18:52:27 +0000
message:
  (jelmer) Fix development-colo to put its lock directory in .bzr/,
   not in . (Jelmer Vernooij)
modified:
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/tests/per_bzrdir/test_bzrdir.py test_bzrdir.py-20100829143338-2uachgod1c3liktl-1
  bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2011-10-14 10:48:50 +0000
+++ b/bzrlib/bzrdir.py	2011-11-04 16:10:43 +0000
@@ -972,7 +972,7 @@
 
     def __init__(self, _transport, _format):
         super(BzrDirMeta1Colo, self).__init__(_transport, _format)
-        self.control_files = lockable_files.LockableFiles(_transport,
+        self.control_files = lockable_files.LockableFiles(self.control_transport,
             self._format._lock_file_name, self._format._lock_class)
 
     def _get_branch_path(self, name):

=== modified file 'bzrlib/tests/per_bzrdir/test_bzrdir.py'
--- a/bzrlib/tests/per_bzrdir/test_bzrdir.py	2011-10-06 23:14:32 +0000
+++ b/bzrlib/tests/per_bzrdir/test_bzrdir.py	2011-11-04 16:32:00 +0000
@@ -668,4 +668,14 @@
         new_branch = control.create_branch()
         self.assertTrue(new_branch._format.supports_stacking())
 
-
+    def test_no_leftover_dirs(self):
+        # bug 886196: development-colo uses a branch-lock directory
+        # in the user directory rather than the control directory.
+        if not self.bzrdir_format.colocated_branches:
+            raise TestNotApplicable(
+                "format does not support colocated branches")
+        branch = self.make_branch('.', format='development-colo')
+        branch.bzrdir.create_branch(name="another-colocated-branch")
+        self.assertEquals(
+            branch.bzrdir.user_transport.list_dir("."),
+            [".bzr"])

=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py	2011-10-13 16:52:17 +0000
+++ b/bzrlib/tests/test_bzrdir.py	2011-11-04 16:32:00 +0000
@@ -1430,3 +1430,4 @@
             bzrdir.BzrDirMetaFormat1())
         self.assertRaises(errors.BzrError, converter.convert, tree.bzrdir,
             None)
+




More information about the bazaar-commits mailing list