~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_directive.py

  • Committer: Ian Clatworthy
  • Date: 2008-07-30 04:34:59 UTC
  • mfrom: (3535.8.4 bzr.dev.send)
  • mto: This revision was merged to the branch mainline in revision 3594.
  • Revision ID: ian.clatworthy@canonical.com-20080730043459-fpeor9jlisylif0b
Give a more specific error when target branch unreachable (James Westby)

Show diffs side-by-side

added added

removed removed

Lines of Context:
576
576
            branch_c.base, base_revision_id='rev2a')
577
577
        revision = md.install_revisions(tree_b.branch.repository)
578
578
 
 
579
    def test_handle_target_not_a_branch(self):
 
580
        tree_a, tree_b, branch_c = self.make_trees()
 
581
        branch_c.pull(tree_a.branch)
 
582
        self.build_tree_contents([('tree_a/file', 'content_q\ncontent_r\n')])
 
583
        tree_a.commit('rev3a', rev_id='rev3a')
 
584
        md = self.from_objects(tree_a.branch.repository, 'rev3a', 500, 36,
 
585
            branch_c.base, base_revision_id='rev2a')
 
586
        md.target_branch = self.get_url('not-a-branch')
 
587
        self.assertRaises(errors.TargetNotBranch, md.install_revisions,
 
588
                tree_b.branch.repository)
 
589
 
579
590
 
580
591
class TestMergeDirective1Branch(tests.TestCaseWithTransport,
581
592
    TestMergeDirectiveBranch):