174
174
transform.finalize()
175
175
return (limbodir, deletiondir)
177
def test_merge_with_existing_limbo(self):
178
wt = self.make_branch_and_tree('this')
179
(limbodir, deletiondir) = self.get_limbodir_deletiondir(wt)
177
def test_merge_with_existing_limbo_empty(self):
178
"""Empty limbo dir is just cleaned up - see bug 427773"""
179
wt = self.make_branch_and_tree('this')
180
(limbodir, deletiondir) = self.get_limbodir_deletiondir(wt)
182
self.do_merge(wt, wt)
184
def test_merge_with_existing_limbo_non_empty(self):
185
wt = self.make_branch_and_tree('this')
186
(limbodir, deletiondir) = self.get_limbodir_deletiondir(wt)
188
os.mkdir(os.path.join(limbodir, 'something'))
181
189
self.assertRaises(errors.ExistingLimbo, self.do_merge, wt, wt)
182
190
self.assertRaises(errors.LockError, wt.unlock)
184
def test_merge_with_pending_deletion(self):
185
wt = self.make_branch_and_tree('this')
186
(limbodir, deletiondir) = self.get_limbodir_deletiondir(wt)
187
os.mkdir(deletiondir)
192
def test_merge_with_pending_deletion_empty(self):
193
wt = self.make_branch_and_tree('this')
194
(limbodir, deletiondir) = self.get_limbodir_deletiondir(wt)
195
os.mkdir(deletiondir)
196
self.do_merge(wt, wt)
198
def test_merge_with_pending_deletion_non_empty(self):
199
"""Also see bug 427773"""
200
wt = self.make_branch_and_tree('this')
201
(limbodir, deletiondir) = self.get_limbodir_deletiondir(wt)
202
os.mkdir(deletiondir)
203
os.mkdir(os.path.join(deletiondir, 'something'))
188
204
self.assertRaises(errors.ExistingPendingDeletion, self.do_merge, wt, wt)
189
205
self.assertRaises(errors.LockError, wt.unlock)