diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-04-28 15:35:36 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-04-28 15:35:36 +0200 |
commit | c2c4d4aff42910e779855e755cff8e5f681de0d9 (patch) | |
tree | d9cc93996bcb70bea30617b9f45a2801f6f5b794 | |
parent | b7a0e0600689e9dd9a7a4a5b2bc4a957df6cfc57 (diff) | |
parent | 297332675da5bcc48c1af0cc7ee525d46b362d5b (diff) | |
download | bzr-fastimport-c2c4d4aff42910e779855e755cff8e5f681de0d9.tar.gz |
Merge test for bug 410249.
-rw-r--r-- | tests/test_generic_processor.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/test_generic_processor.py b/tests/test_generic_processor.py index 111fd56..4fc5463 100644 --- a/tests/test_generic_processor.py +++ b/tests/test_generic_processor.py @@ -194,6 +194,46 @@ class TestCaseForGenericProcessor(tests.TestCaseWithTransport): revtree.inventory.root.children[path].revision) +class TestImportToPackTag(TestCaseForGenericProcessor): + + def file_command_iter(self, path, kind='file', content='aaa', + executable=False, to_kind=None, to_content='bbb', to_executable=None): + # Revno 1: create a file or symlink + # Revno 2: modify it + if to_kind is None: + to_kind = kind + if to_executable is None: + to_executable = executable + def command_list(): + author = ['', 'bugs@a.com', time.time(), time.timezone] + committer = ['', 'elmer@a.com', time.time(), time.timezone] + def files_one(): + yield commands.FileModifyCommand(path, + kind_to_mode(kind, executable), None, content) + yield commands.CommitCommand('head', '1', author, + committer, "commit 1", None, [], files_one) + def files_two(): + yield commands.FileModifyCommand(path, + kind_to_mode(to_kind, to_executable), None, to_content) + + # pass "head" for from_ to show that #401249 is worse than I knew + yield commands.CommitCommand('head', '2', author, + committer, "commit 2", "head", [], files_two) + + yield commands.TagCommand('tag1', ':1', committer, "tag 1") + + # pass "head" for from_ to demonstrate #401249 + yield commands.TagCommand('tag2', 'head', committer, "tag 2") + return command_list + + def test_tag(self): + handler, branch = self.get_handler() + path = 'a' + raise tests.KnownFailure("non-mark committish not yet supported" + "- bug #410249") + handler.process(self.file_command_iter(path)) + + class TestImportToPackModify(TestCaseForGenericProcessor): def file_command_iter(self, path, kind='file', content='aaa', |