/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_directive.py

  • Committer: Robert Collins
  • Date: 2008-02-13 03:30:01 UTC
  • mfrom: (3221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3224.
  • Revision ID: robertc@robertcollins.net-20080213033001-rw70ul0zb02ph856
Merge to fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
553
553
        revision = md.install_revisions(tree_b.branch.repository)
554
554
        self.assertEqual('rev2a', revision)
555
555
 
 
556
    def test_use_submit_for_missing_dependency(self):
 
557
        tree_a, tree_b, branch_c = self.make_trees()
 
558
        branch_c.pull(tree_a.branch)
 
559
        self.build_tree_contents([('tree_a/file', 'content_q\ncontent_r\n')])
 
560
        tree_a.commit('rev3a', rev_id='rev3a')
 
561
        md = self.from_objects(tree_a.branch.repository, 'rev3a', 500, 36,
 
562
            branch_c.base, base_revision_id='rev2a')
 
563
        revision = md.install_revisions(tree_b.branch.repository)
 
564
 
556
565
 
557
566
class TestMergeDirective1Branch(tests.TestCaseWithTransport,
558
567
    TestMergeDirectiveBranch):
564
573
 
565
574
    def from_objects(self, repository, revision_id, time, timezone,
566
575
        target_branch, patch_type='bundle', local_target_branch=None,
567
 
        public_branch=None, message=None):
568
 
        return merge_directive.MergeDirective.from_objects(
569
 
            repository, revision_id, time, timezone, target_branch,
570
 
            patch_type, local_target_branch, public_branch, message)
 
576
        public_branch=None, message=None, base_revision_id=None):
 
577
        if base_revision_id is not None:
 
578
            raise tests.TestNotApplicable('This format does not support'
 
579
                                          ' explicit bases.')
 
580
        repository.lock_write()
 
581
        try:
 
582
            return merge_directive.MergeDirective.from_objects( repository,
 
583
                revision_id, time, timezone, target_branch, patch_type,
 
584
                local_target_branch, public_branch, message)
 
585
        finally:
 
586
            repository.unlock()
571
587
 
572
588
    def make_merge_directive(self, revision_id, testament_sha1, time, timezone,
573
589
                 target_branch, patch=None, patch_type=None,