~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-28 07:08:27 UTC
  • mfrom: (2553.1.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070628070827-h5s313dg5tnag9vj
(robertc) Show the names of commit hooks during commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import shutil
23
23
import sys
24
24
 
25
 
from bzrlib import (
26
 
    branch as _mod_branch,
27
 
    bzrdir,
28
 
    errors,
29
 
    workingtree,
30
 
    )
 
25
import bzrlib.bzrdir as bzrdir
 
26
import bzrlib.errors as errors
31
27
from bzrlib.tests.blackbox import ExternalBase
32
28
 
33
29
 
84
80
            format=bzrdir.BzrDirMetaFormat1())
85
81
        # check no tree was created
86
82
        self.assertRaises(errors.NoWorkingTree, branch.bzrdir.open_workingtree)
87
 
        out, err = self.run_bzr('checkout treeless-branch')
 
83
        out, err = self.run_bzr('checkout', 'treeless-branch')
88
84
        # we should have a tree now
89
85
        branch.bzrdir.open_workingtree()
90
86
        # with no diff
91
 
        out, err = self.run_bzr('diff treeless-branch')
 
87
        out, err = self.run_bzr('diff', 'treeless-branch')
92
88
 
93
89
        # now test with no parameters
94
90
        branch = bzrdir.BzrDir.create_branch_convenience(
102
98
        branch.bzrdir.open_workingtree()
103
99
        # with no diff
104
100
        out, err = self.run_bzr('diff')
105
 
 
106
 
    def test_checkout_in_branch_with_r(self):
107
 
        branch = _mod_branch.Branch.open('branch')
108
 
        branch.bzrdir.destroy_workingtree()
109
 
        os.chdir('branch')
110
 
        self.run_bzr('checkout -r 1')
111
 
        tree = workingtree.WorkingTree.open('.')
112
 
        self.assertEqual('1', tree.last_revision())
113
 
        branch.bzrdir.destroy_workingtree()
114
 
        self.run_bzr('checkout -r 0')
115
 
        self.assertIs(None, tree.last_revision())