/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_create_clone.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-27 04:33:10 UTC
  • mfrom: (4053.2.5 jam-fix)
  • Revision ID: pqm@pqm.ubuntu.com-20090227043310-f96id6jsevm31349
Fix "'null:' not present" error when pushing. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for branch.create_clone behaviour."""
18
18
 
19
19
from bzrlib.branch import Branch
 
20
from bzrlib import errors
 
21
from bzrlib import remote
 
22
from bzrlib import tests
20
23
from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
21
 
from bzrlib import remote
22
24
 
23
25
 
24
26
class TestCreateClone(TestCaseWithBranch):
57
59
        self.assertEqual(revid, result.last_revision())
58
60
        self.assertEqual(trunk.base, result.get_stacked_on_url())
59
61
 
 
62
    def test_create_clone_of_multiple_roots(self):
 
63
        try:
 
64
            builder = self.make_branch_builder('local')
 
65
        except (errors.TransportNotPossible, errors.UninitializableFormat):
 
66
            raise tests.TestNotApplicable('format not directly constructable')
 
67
        builder.start_series()
 
68
        builder.build_snapshot('rev1', None, [
 
69
            ('add', ('', 'root-id', 'directory', ''))])
 
70
        builder.build_snapshot('rev2', ['rev1'], [])
 
71
        builder.build_snapshot('other', None, [
 
72
            ('add', ('', 'root-id', 'directory', ''))])
 
73
        builder.build_snapshot('rev3', ['rev2', 'other'], [])
 
74
        builder.finish_series()
 
75
        local = builder.get_branch()
 
76
        local.bzrdir.clone(self.get_url('remote'), revision_id='rev3')
 
77
 
60
78
    def assertBranchHookBranchIsStacked(self, pre_change_params):
61
79
        # Just calling will either succeed or fail.
62
80
        pre_change_params.branch.get_stacked_on_url()