[MERGE] Fix RemoteBranch to be used correctly in tests using bzr+ssh, to fire off Branch hooks correctly, and improve the branch_implementations tests to check that making a branch gets the right format under test.

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Feb 18 08:01:41 GMT 2009


>>>>> "robert" == Robert Collins <robertc at robertcollins.net> writes:

    robert> We have a per_repository test under discussion. You
    robert> say some other tests need a comment copied to it, but
    robert> you're not saying which ones :(.

Test *names* :-(

Let's use a more precise media then (I should have think about
that from the start, damn it, we *have* a tool for that :-( ):

 test_clone_on_transport_preserves_repo_format
 test_clone_unstackable_branch_preserves_stackable_repo_format

=== modified file 'bzrlib/tests/bzrdir_implementations/test_bzrdir.py'
--- bzrlib/tests/bzrdir_implementations/test_bzrdir.py	2009-02-13 00:52:18 +0000
+++ bzrlib/tests/bzrdir_implementations/test_bzrdir.py	2009-02-18 07:06:05 +0000
@@ -559,6 +559,8 @@
         source_branch = bzrlib.branch.Branch.open(
             self.get_vfs_only_url('source'))
         if isinstance(target_repo, RemoteRepository):
+            # we have to look at the real repo to see whether RemoteRepository
+            # did the right thing.
             target_repo._ensure_real()
             target_repo = target_repo._real_repository
         self.assertEqual(target_repo._format, source_branch.repository._format)

=== modified file 'bzrlib/tests/per_repository/test_repository.py'
--- bzrlib/tests/per_repository/test_repository.py	2009-02-13 00:52:18 +0000
+++ bzrlib/tests/per_repository/test_repository.py	2009-02-18 07:03:01 +0000
@@ -815,6 +815,8 @@
             repo = repo._real_repository
         target_repo = target.open_repository()
         if isinstance(target_repo, remote.RemoteRepository):
+            # we have to look at the real repo to see whether RemoteRepository
+            # did the right thing.
             target_repo._ensure_real()
             target_repo = target_repo._real_repository
         # The repository format is preserved.

And, avoiding bundle for BB sanity, available at
lp:~vila/bzr/format-on-push-with-comments.

    >> Err, I'm talking about the 'call is None' part. It sounds a bit
    >> surprising to record calls and their parameters and sometimes
    >> just don't care about the call itself but still recording
    >> it. Hence the proposal to update the comment.

    robert> Well I don't care about the call at all

I realized that, but I found it suprising without reading the
rest of the patch, which is clear in the patch context. The
suggested clarification was for future readers.

    robert> I'll add an explanation.

I can't find it in bzr.dev, oh well... never mind :-/

  Vincent



More information about the bazaar mailing list