/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/branch_implementations/test_push.py

  • Committer: Andrew Bennetts
  • Date: 2008-12-16 02:58:31 UTC
  • mto: This revision was merged to the branch mainline in revision 3910.
  • Revision ID: andrew.bennetts@canonical.com-20081216025831-vgwlxfoz7n9b8fyh
Skip test for two formats, and fix format 5 by avoiding a full history sync with non-format5 branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        self.assertEqual('rev-2', target.last_revision())
181
181
 
182
182
    def test_push_with_default_stacking_does_not_create_broken_branch(self):
 
183
        if isinstance(self.branch_format, branch.BzrBranchFormat4):
 
184
            raise tests.TestNotApplicable('Not a metadir format.')
 
185
        if isinstance(self.branch_format, branch.BranchReferenceFormat):
 
186
            raise tests.TestSkipped(
 
187
                "BranchBuilder can't make reference branches.")
183
188
        repo = self.make_repository('repo', shared=True, format='1.6')
184
189
        builder = self.make_branch_builder('repo/local')
185
190
        builder.start_series()
190
195
        builder.build_snapshot('rev-3', ['rev-2'],
191
196
            [('modify', ('f-id', 'new-content\n'))])
192
197
        builder.finish_series()
193
 
        branch = builder.get_branch()
194
 
        branch.bzrdir.sprout(self.get_url('trunk'), revision_id='rev-1')
 
198
        trunk = builder.get_branch()
 
199
        trunk.bzrdir.sprout(self.get_url('trunk'), revision_id='rev-1')
195
200
        self.make_bzrdir('.').get_config().set_default_stack_on('trunk')
196
201
        output = StringIO()
197
 
        push._show_push_branch(branch, 'rev-2', self.get_url('remote'), output)
 
202
        push._show_push_branch(trunk, 'rev-2', self.get_url('remote'), output)
198
203
        remote_branch = Branch.open(self.get_url('remote'))
199
 
        branch.push(remote_branch)
 
204
        trunk.push(remote_branch)
 
205
        remote_branch.check()
200
206
 
201
207
 
202
208
class TestPushHook(TestCaseWithBranch):