~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_switch.py

  • Committer: Daniel Watkins
  • Date: 2009-02-07 16:50:10 UTC
  • mto: This revision was merged to the branch mainline in revision 4964.
  • Revision ID: daniel@daniel-watkins.co.uk-20090207165010-7qds728qsn1oeep1
Updated testcase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
    def test_switch_with_revision(self):
100
100
        """Test switch when a revision is given."""
101
101
        # Create a tree with 2 revisions
102
 
        tree = self._setup_tree()
 
102
        tree = self.make_branch_and_tree('branch-1')
 
103
        self.build_tree(['branch-1/file-1'])
 
104
        tree.add('file-1')
 
105
        tree.commit(rev_id='rev1', message='rev1')
103
106
        self.build_tree(['branch-1/file-2'])
104
107
        tree.add('file-2')
105
 
        tree.commit('rev2')
 
108
        tree.commit(rev_id='rev2', message='rev2')
106
109
        # Check it out and switch to revision 1
107
110
        checkout = tree.branch.create_checkout('checkout',
108
111
                                               lightweight=self.lightweight)