~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_pull.py

  • Committer: Andrew Bennetts
  • Date: 2011-02-08 07:00:37 UTC
  • mto: This revision was merged to the branch mainline in revision 5660.
  • Revision ID: andrew.bennetts@canonical.com-20110208070037-ge0e7btgnfh38by7
Make 'bzr reconfigure --unstacked' fetch tagged revisions too. (#401646)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    memorytree,
26
26
    revision,
27
27
    )
28
 
from bzrlib.tests import per_branch, TestNotApplicable
 
28
from bzrlib.tests import (
 
29
    fixtures,
 
30
    per_branch,
 
31
    TestNotApplicable,
 
32
    )
29
33
 
30
34
 
31
35
class TestPull(per_branch.TestCaseWithBranch):
144
148
            builder = self.make_branch_builder('source')
145
149
        except errors.UninitializableFormat:
146
150
            raise TestNotApplicable('uninitializeable format')
147
 
        builder.build_commit(message="Rev 1", rev_id='rev-1')
148
 
        source = builder.get_branch()
 
151
        source = fixtures.build_branch_with_non_ancestral_tag(builder)
 
152
        source.tags.delete_tag('tag-a')
149
153
        target = source.bzrdir.sprout('target').open_branch()
150
 
        # Add a non-ancestry tag to source
151
 
        builder.build_commit(message="Rev 2", rev_id='rev-2')
152
 
        try:
153
 
            source.tags.set_tag('tag-a', 'rev-2')
154
 
        except errors.TagsNotSupported:
155
 
            raise TestNotApplicable('format does not support tags.')
156
 
        source.set_last_revision_info(1, 'rev-1')
 
154
        source.tags.set_tag('tag-a', 'rev-2')
157
155
        # Pull from source
158
156
        target.pull(source)
159
157
        # The tag is present, and so is its revision.
167
165
            builder = self.make_branch_builder('source')
168
166
        except errors.UninitializableFormat:
169
167
            raise TestNotApplicable('uninitializeable format')
170
 
        builder.build_commit(message="Rev 1", rev_id='rev-1')
171
 
        source = builder.get_branch()
 
168
        source = fixtures.build_branch_with_non_ancestral_tag(builder)
 
169
        source.tags.delete_tag('tag-a')
172
170
        target = source.bzrdir.sprout('target').open_branch()
173
 
        # Add a non-ancestry tag to source
174
 
        builder.build_commit(message="Rev 2", rev_id='rev-2')
175
 
        try:
176
 
            source.tags.set_tag('tag-a', 'rev-2')
177
 
        except errors.TagsNotSupported:
178
 
            raise TestNotApplicable('format does not support tags.')
179
 
        source.set_last_revision_info(1, 'rev-1')
 
171
        source.tags.set_tag('tag-a', 'rev-2')
180
172
        # Add a new commit to the ancestry
181
173
        builder.build_commit(message="Rev 2 again", rev_id='rev-2-again')
182
174
        # Pull from source