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