40
40
self.failIfExists('foo')
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')
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')
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')
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')
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)
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)
109
109
def test_remove_tree_remote_path(self):
110
110
# TODO: I can't think of a way to implement this...