Rev 6515: one more test that wanted to have a branch reference 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:40:34 UTC 2012


At http://bazaar.launchpad.net/~jameinel/bzr/2.5-remote-wt-tests-1046697

------------------------------------------------------------
revno: 6515
revision-id: john at arbash-meinel.com-20120906094009-zgcnvlkfyds3qdr9
parent: john at arbash-meinel.com-20120906092930-gnpscmlxxpx23isj
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.5-remote-wt-tests-1046697
timestamp: Thu 2012-09-06 13:40:09 +0400
message:
  one more test that wanted to have a branch reference
  
  and another test that assumed wt.branch was in the same location as wt.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_workingtree/test_workingtree.py'
--- a/bzrlib/tests/per_workingtree/test_workingtree.py	2012-09-06 09:29:30 +0000
+++ b/bzrlib/tests/per_workingtree/test_workingtree.py	2012-09-06 09:40:09 +0000
@@ -132,8 +132,10 @@
                          result[0][:4])
 
     def test_open_containing(self):
-        branch = self.make_branch_and_tree('.').branch
-        local_base = urlutils.local_path_from_url(branch.base)
+        local_wt = self.make_branch_and_tree('.')
+        local_url = local_wt.bzrdir.root_transport.base
+        local_base = urlutils.local_path_from_url(local_url)
+        del local_wt
 
         # Empty opens '.'
         wt, relpath = WorkingTree.open_containing()
@@ -372,14 +374,8 @@
         # that formats where initialising a branch does not initialise a
         # tree - and thus have separable entities - support skewing the
         # two things.
-        branch = self.make_branch('tree')
-        try:
-            # if there is a working tree now, this is not supported.
-            branch.bzrdir.open_workingtree()
-            return
-        except errors.NoWorkingTree:
-            pass
-        wt = branch.bzrdir.create_workingtree()
+        self.requireBranchReference()
+        wt = self.make_branch_and_tree('tree')
         wt.commit('A', allow_pointless=True, rev_id='A')
         wt.set_last_revision(None)
         self.assertEqual([], wt.get_parent_ids())



More information about the bazaar-commits mailing list