~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2007-07-04 08:46:22 UTC
  • mfrom: (2552.2.5 run_bzr)
  • mto: This revision was merged to the branch mainline in revision 2588.
  • Revision ID: mbp@sourcefrog.net-20070704084622-6b8enfv9o71s7ung
Merge more runbzr cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        self.failIfExists('foo')
41
41
    
42
42
    def test_remove_tree_original_branch_explicit(self):
43
 
        self.run_bzr('remove-tree', 'branch1')
 
43
        self.run_bzr('remove-tree branch1')
44
44
        self.failIfExists('branch1/foo')
45
45
 
46
46
    def test_remove_tree_sprouted_branch(self):
53
53
    def test_remove_tree_sprouted_branch_explicit(self):
54
54
        self.tree.bzrdir.sprout('branch2')
55
55
        self.failUnlessExists('branch2/foo')
56
 
        self.run_bzr('remove-tree', 'branch2')
 
56
        self.run_bzr('remove-tree branch2')
57
57
        self.failIfExists('branch2/foo')
58
58
 
59
59
    def test_remove_tree_checkout(self):
68
68
    def test_remove_tree_checkout_explicit(self):
69
69
        self.tree.branch.create_checkout('branch2', lightweight=False)
70
70
        self.failUnlessExists('branch2/foo')
71
 
        self.run_bzr('remove-tree', 'branch2')
 
71
        self.run_bzr('remove-tree branch2')
72
72
        self.failIfExists('branch2/foo')
73
73
        self.failUnlessExists('branch1/foo')
74
74
 
88
88
    def test_remove_tree_lightweight_checkout_explicit(self):
89
89
        self.tree.branch.create_checkout('branch2', lightweight=True)
90
90
        self.failUnlessExists('branch2/foo')
91
 
        output = self.run_bzr(
92
 
            ["Cannot remove working tree from lightweight checkout"],
93
 
            'remove-tree', 'branch2', retcode=3)
 
91
        output = self.run_bzr_error(
 
92
            ["You cannot remove the working tree from a lightweight checkout"],
 
93
            'remove-tree branch2', retcode=3)
94
94
        self.failUnlessExists('branch2/foo')
95
95
        self.failUnlessExists('branch1/foo')
96
96
 
97
97
    def test_remove_tree_empty_dir(self):
98
98
        os.mkdir('branch2')
99
99
        os.chdir('branch2')
100
 
        output = self.run_bzr(["Not a branch"],
101
 
                              'remove-tree', retcode=3)
 
100
        output = self.run_bzr_error(["Not a branch"],
 
101
                                    'remove-tree', retcode=3)
102
102
 
103
103
    def test_remove_tree_repeatedly(self):
104
 
        self.run_bzr('remove-tree', 'branch1')
 
104
        self.run_bzr('remove-tree branch1')
105
105
        self.failIfExists('branch1/foo')
106
106
        output = self.run_bzr_error(["No working tree to remove"],
107
 
                                    'remove-tree', 'branch1', retcode=3)
 
107
                                    'remove-tree branch1', retcode=3)
108
108
 
109
109
    def test_remove_tree_remote_path(self):
110
110
        # TODO: I can't think of a way to implement this...