~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir/test_controldir.py

merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    )
34
34
import bzrlib.revision
35
35
from bzrlib.tests import (
 
36
    fixtures,
36
37
    ChrootedTestCase,
37
38
    TestNotApplicable,
38
39
    TestSkipped,
675
676
        # when sprouting a branch all revisions named in the tags are copied
676
677
        # too.
677
678
        builder = self.make_branch_builder('source')
678
 
        builder.build_commit(message="Rev 1", rev_id='rev-1')
679
 
        builder.build_commit(message="Rev 2", rev_id='rev-2')
680
 
        source = builder.get_branch()
 
679
        source = fixtures.build_branch_with_non_ancestral_rev(builder)
681
680
        try:
682
681
            source.tags.set_tag('tag-a', 'rev-2')
683
682
        except errors.TagsNotSupported:
684
683
            raise TestNotApplicable('Branch format does not support tags.')
685
 
        source.set_last_revision_info(1, 'rev-1')
686
684
        # Now source has a tag not in its ancestry.  Sprout its controldir.
687
685
        dir = source.bzrdir
688
686
        target = dir.sprout(self.get_url('target'))