626
625
self.failUnlessExists("a")
627
def test_merge_fetches_tags(self):
628
"""Tags are updated by merge, and revisions named in those tags are
631
# Make a source, sprout a target off it
632
builder = self.make_branch_builder('source')
633
builder.build_commit(message="Rev 1", rev_id='rev-1')
634
source = builder.get_branch()
635
target_bzrdir = source.bzrdir.sprout('target')
636
# Add a non-ancestry tag to source
637
builder.build_commit(message="Rev 2a", rev_id='rev-2a')
638
source.tags.set_tag('tag-a', 'rev-2a')
639
source.set_last_revision_info(1, 'rev-1')
640
builder.build_commit(message="Rev 2b", rev_id='rev-2b')
642
self.run_bzr('merge -d target source')
643
target = target_bzrdir.open_branch()
644
# The tag is present, and so is its revision.
645
self.assertEqual('rev-2a', target.tags.lookup_tag('tag-a'))
646
target.repository.get_revision('rev-2a')
629
649
class TestMergeForce(tests.TestCaseWithTransport):