~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
from bzrlib.workingtree import WorkingTree
50
50
 
51
51
 
52
 
# TODO: Make a branch using basis branch, and check that it 
53
 
# doesn't request any files that could have been avoided, by 
54
 
# hooking into the Transport.
55
 
 
56
 
 
57
52
class TestCaseWithBranch(TestCaseWithBzrDir):
58
53
 
59
54
    def setUp(self):
164
159
        tree_b.branch.repository.fetch(tree_a.branch.repository)
165
160
        return tree_a, tree_b
166
161
 
167
 
    def test_clone_branch(self):
168
 
        """Copy the stores from one branch to another"""
169
 
        tree_a, tree_b = self.get_balanced_branch_pair()
170
 
        tree_b.commit("silly commit")
171
 
        os.mkdir('c')
172
 
        # this fails to test that the history from a was not used.
173
 
        dir_c = tree_a.bzrdir.clone('c', basis=tree_b.bzrdir)
174
 
        self.assertEqual(tree_a.branch.revision_history(),
175
 
                         dir_c.open_branch().revision_history())
176
 
 
177
162
    def test_clone_partial(self):
178
163
        """Copy only part of the history of a branch."""
179
164
        # TODO: RBC 20060208 test with a revision not on revision-history.