Rev 5299: Fixup tests in per_interbranch not being strict about making the from format the configured one. in http://bazaar.launchpad.net/~lifeless/bzr/loomsupport

Robert Collins robertc at robertcollins.net
Thu Jun 17 07:30:23 BST 2010


At http://bazaar.launchpad.net/~lifeless/bzr/loomsupport

------------------------------------------------------------
revno: 5299
revision-id: robertc at robertcollins.net-20100617063022-kb68pzdohhw9ezi8
parent: robertc at robertcollins.net-20100616081750-a5fmqmzqmcmefuo0
committer: Robert Collins <robertc at robertcollins.net>
branch nick: loomsupport
timestamp: Thu 2010-06-17 18:30:22 +1200
message:
  Fixup tests in per_interbranch not being strict about making the from format the configured one.
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2010-06-16 08:17:50 +0000
+++ b/bzrlib/branch.py	2010-06-17 06:30:22 +0000
@@ -1023,7 +1023,6 @@
             self._extend_partial_history(distance_from_last)
         return self._partial_revision_history_cache[distance_from_last]
 
-    @needs_write_lock
     def pull(self, source, overwrite=False, stop_revision=None,
              possible_transports=None, *args, **kwargs):
         """Mirror source into this branch.
@@ -3195,6 +3194,7 @@
         """
         raise NotImplementedError(klass._get_branch_formats_to_test)
 
+    @needs_write_lock
     def pull(self, overwrite=False, stop_revision=None,
              possible_transports=None, local=False):
         """Mirror source into target branch.
@@ -3205,6 +3205,7 @@
         """
         raise NotImplementedError(self.pull)
 
+    @needs_write_lock
     def update_revisions(self, stop_revision=None, overwrite=False,
                          graph=None):
         """Pull in new perfect-fit revisions.
@@ -3218,6 +3219,7 @@
         """
         raise NotImplementedError(self.update_revisions)
 
+    @needs_write_lock
     def push(self, overwrite=False, stop_revision=None,
              _override_hook_source_branch=None):
         """Mirror the source branch into the target branch.
@@ -3305,6 +3307,7 @@
                              (this_last_revision, this_revno)])
         self.target.set_last_revision_info(stop_revno, stop_revision)
 
+    @needs_write_lock
     def pull(self, overwrite=False, stop_revision=None,
              possible_transports=None, run_hooks=True,
              _override_hook_target=None, local=False):

=== modified file 'bzrlib/tests/per_interbranch/test_copy_content_into.py'
--- a/bzrlib/tests/per_interbranch/test_copy_content_into.py	2010-06-14 06:57:25 +0000
+++ b/bzrlib/tests/per_interbranch/test_copy_content_into.py	2010-06-17 06:30:22 +0000
@@ -27,14 +27,14 @@
 class TestCopyContentInto(TestCaseWithInterBranch):
 
     def test_contract_convenience_method(self):
-        self.tree1 = self.make_branch_and_tree('tree1')
+        self.tree1 = self.make_from_branch_and_tree('tree1')
         rev1 = self.tree1.commit('one')
         branch2 = self.make_to_branch('tree2')
         branch2.repository.fetch(self.tree1.branch.repository)
         self.tree1.branch.copy_content_into(branch2, revision_id=rev1)
 
     def test_inter_is_used(self):
-        self.tree1 = self.make_branch_and_tree('tree1')
+        self.tree1 = self.make_from_branch_and_tree('tree1')
         self.addCleanup(branch.InterBranch.unregister_optimiser,
             StubMatchingInter)
         branch.InterBranch.register_optimiser(StubMatchingInter)

=== modified file 'bzrlib/tests/per_interbranch/test_get.py'
--- a/bzrlib/tests/per_interbranch/test_get.py	2010-06-14 06:37:11 +0000
+++ b/bzrlib/tests/per_interbranch/test_get.py	2010-06-17 06:30:22 +0000
@@ -24,10 +24,10 @@
     )
 
 
-class TestCopyContentInto(TestCaseWithInterBranch):
+class TestInterBranchGet(TestCaseWithInterBranch):
 
     def test_gets_right_inter(self):
-        self.tree1 = self.make_branch_and_tree('tree1')
+        self.tree1 = self.make_from_branch_and_tree('tree1')
         branch2 = self.make_to_branch('tree2')
         self.assertIs(branch.InterBranch.get(
             self.tree1.branch, branch2).__class__,

=== modified file 'bzrlib/tests/per_interbranch/test_push.py'
--- a/bzrlib/tests/per_interbranch/test_push.py	2010-02-23 07:43:11 +0000
+++ b/bzrlib/tests/per_interbranch/test_push.py	2010-06-17 06:30:22 +0000
@@ -145,7 +145,7 @@
         except (errors.IncompatibleFormat, errors.UninitializableFormat):
             # This Branch format cannot create shared repositories
             return
-        # This is a little bit trickier because make_branch_and_tree will not
+        # This is a little bit trickier because make_from_branch_and_tree will not
         # re-use a shared repository.
         try:
             a_branch = self.make_from_branch('repo/tree')

=== modified file 'bzrlib/tests/per_interbranch/test_update_revisions.py'
--- a/bzrlib/tests/per_interbranch/test_update_revisions.py	2009-05-07 05:08:46 +0000
+++ b/bzrlib/tests/per_interbranch/test_update_revisions.py	2010-06-17 06:30:22 +0000
@@ -26,7 +26,7 @@
 
     def setUp(self):
         super(TestUpdateRevisions, self).setUp()
-        self.tree1 = self.make_branch_and_tree('tree1')
+        self.tree1 = self.make_from_branch_and_tree('tree1')
         rev1 = self.tree1.commit('one')
         branch2 = self.make_to_branch('tree2')
         branch2.repository.fetch(self.tree1.branch.repository)




More information about the bazaar-commits mailing list