~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_switch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-15 21:00:20 UTC
  • mfrom: (3113.5.1 test.174055)
  • Revision ID: pqm@pqm.ubuntu.com-20071215210020-m28kk1qmbcc9n6qs
(bialix) XFAIL test for #174055: can't run bzr info while dirstate
 is locked

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        self.assertContainsRe(err, 'Updated to revision 1.\n')
49
49
        self.assertContainsRe(err, 'Switched to branch: .*/branch2.\n')
50
50
        self.assertEqual('', out)
51
 
 
52
 
    def test_switch_finds_relative_branch(self):
53
 
        """Switch will find 'foo' relative to the branch that the checkout is of."""
54
 
        self.build_tree(['repo/'])
55
 
        tree1 = self.make_branch_and_tree('repo/brancha')
56
 
        tree1.commit('foo')
57
 
        tree2 = self.make_branch_and_tree('repo/branchb')
58
 
        tree2.pull(tree1.branch)
59
 
        branchb_id = tree2.commit('bar')
60
 
        checkout =  tree1.branch.create_checkout('checkout', lightweight=True)
61
 
        self.run_bzr(['switch', 'branchb'], working_dir='checkout')
62
 
        self.assertEqual(branchb_id, checkout.last_revision())
63
 
        checkout = checkout.bzrdir.open_workingtree()
64
 
        self.assertEqual(tree2.branch.base, checkout.branch.base)
65