122
122
self.run_bzr('remove-tree branch1 --force')
123
123
self.failIfExists('branch1/foo')
124
124
self.failUnlessExists('branch1/bar')
126
def test_remove_tree_pending_merges(self):
127
self.run_bzr(['branch', 'branch1', 'branch2'])
128
self.build_tree(['branch1/bar'])
130
self.tree.commit('2')
131
self.failUnlessExists('branch1/bar')
132
self.run_bzr(['merge', '../branch1'], working_dir='branch2')
133
self.failUnlessExists('branch2/bar')
134
self.run_bzr(['revert', '.'], working_dir='branch2')
135
self.failIfExists('branch2/bar')
136
output = self.run_bzr_error(["Working tree .* has uncommitted changes"],
137
'remove-tree branch2', retcode=3)
139
def test_remove_tree_pending_merges_force(self):
140
self.run_bzr(['branch', 'branch1', 'branch2'])
141
self.build_tree(['branch1/bar'])
143
self.tree.commit('2')
144
self.failUnlessExists('branch1/bar')
145
self.run_bzr(['merge', '../branch1'], working_dir='branch2')
146
self.failUnlessExists('branch2/bar')
147
self.run_bzr(['revert', '.'], working_dir='branch2')
148
self.failIfExists('branch2/bar')
149
self.run_bzr('remove-tree branch2 --force')
150
self.failIfExists('branch2/foo')
151
self.failIfExists('branch2/bar')