~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branch.py

(vila) Copy tagged revisions as part of 'bzr reconfigure --unstacked'
 (#401646) (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
29
29
from bzrlib.tests import TestCaseWithTransport
30
30
from bzrlib.tests import (
 
31
    fixtures,
31
32
    HardlinkFeature,
32
33
    test_server,
33
34
    )
270
271
 
271
272
    def test_branch_fetches_all_tags(self):
272
273
        builder = self.make_branch_builder('source')
273
 
        builder.build_commit(message="Rev 1", rev_id='rev-1')
274
 
        builder.build_commit(message="Rev 2", rev_id='rev-2')
275
 
        source = builder.get_branch()
 
274
        source = fixtures.build_branch_with_non_ancestral_rev(builder)
276
275
        source.tags.set_tag('tag-a', 'rev-2')
277
 
        source.set_last_revision_info(1, 'rev-1')
278
276
        # Now source has a tag not in its ancestry.  Make a branch from it.
279
277
        self.run_bzr('branch source new-branch')
280
278
        new_branch = branch.Branch.open('new-branch')
466
464
    def test_branch_from_branch_with_tags(self):
467
465
        self.setup_smart_server_with_call_log()
468
466
        builder = self.make_branch_builder('source')
469
 
        builder.build_commit(message="Rev 1", rev_id='rev-1')
470
 
        builder.build_commit(message="Rev 2", rev_id='rev-2')
471
 
        source = builder.get_branch()
 
467
        source = fixtures.build_branch_with_non_ancestral_rev(builder)
472
468
        source.tags.set_tag('tag-a', 'rev-2')
473
469
        source.tags.set_tag('tag-missing', 'missing-rev')
474
 
        source.set_last_revision_info(1, 'rev-1')
475
470
        # Now source has a tag not in its ancestry.  Make a branch from it.
476
471
        self.reset_smart_call_log()
477
472
        out, err = self.run_bzr(['branch', self.get_url('source'), 'target'])