~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-30 06:40:22 UTC
  • mfrom: (2387.1.2 unbasis)
  • Revision ID: pqm@pqm.ubuntu.com-20070330064022-bdce9356befc3795
(robertc) 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.