427
427
self.assertSymlinkTarget(branch, revtree1, path, "aaa")
430
class TestDeleteDirectory(TestCaseForGenericProcessor):
432
def file_command_iter(self, paths, dir):
433
# Revno 1: create multiple files
434
# Revno 2: delete a directory holding those files
436
author = ['', 'bugs@a.com', time.time(), time.timezone]
437
committer = ['', 'elmer@a.com', time.time(), time.timezone]
439
for i, path in enumerate(paths):
440
yield commands.FileModifyCommand(path, 'file', False,
442
yield commands.CommitCommand('head', '1', author,
443
committer, "commit 1", None, [], files_one)
445
yield commands.FileDeleteCommand(dir)
446
yield commands.CommitCommand('head', '2', author,
447
committer, "commit 2", ":1", [], files_two)
450
def test_delete_dir(self):
451
handler, branch = self.get_handler()
452
paths = ['a/b/c', 'a/b/d', 'a/b/e/f', 'a/g']
454
handler.process(self.file_command_iter(paths, dir))
455
revtree0, revtree1 = self.assertChanges(branch, 1,
457
('a',), ('a/b',), ('a/b/c',),
459
('a/b/e',), ('a/b/e/f',),
462
revtree1, revtree2 = self.assertChanges(branch, 2,
464
('a/b',), ('a/b/c',),
466
('a/b/e',), ('a/b/e/f',),
430
470
class TestRename(TestCaseForGenericProcessor):
432
472
def get_command_iter(self, old_path, new_path):