~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2007-03-30 02:36:36 UTC
  • mto: This revision was merged to the branch mainline in revision 2388.
  • Revision ID: robertc@robertcollins.net-20070330023636-v6k82rwz5isl6k3a
Remove the --basis parameter to clone etc. (Robert Collins)

Show diffs side-by-side

added added

removed removed

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