summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Bronson <naesten@gmail.com>2009-07-18 21:28:52 -0400
committerSamuel Bronson <naesten@gmail.com>2009-07-18 21:28:52 -0400
commita37ff4974213e0350dbf0b26f0fd473eb0a0bc75 (patch)
tree7ade1dc3a3d3b5d04fb26659b4e98fbe20472bbc
parent9e0a659f753df4f05e3f9e26ed904c8f70860406 (diff)
downloadbzr-fastimport-a37ff4974213e0350dbf0b26f0fd473eb0a0bc75.tar.gz
Add test for bug #401249.
-rw-r--r--tests/test_generic_processor.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/test_generic_processor.py b/tests/test_generic_processor.py
index 2e8be2f..aee751b 100644
--- a/tests/test_generic_processor.py
+++ b/tests/test_generic_processor.py
@@ -172,6 +172,38 @@ 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, executable,
+ None, content)
+ yield commands.CommitCommand('head', '1', author,
+ committer, "commit 1", None, [], files_one)
+ def files_two():
+ yield commands.FileModifyCommand(path, to_kind, to_executable,
+ None, to_content)
+ yield commands.CommitCommand('head', '2', author,
+ committer, "commit 2", ":1", [], files_two)
+ yield commands.TagCommand('tag1', ':1', committer, "tag 1")
+ yield commands.TagCommand('tag2', 'head', committer, "tag 2")
+ return command_list
+
+ def test_tag(self):
+ handler, branch = self.get_handler()
+ path = 'a'
+ handler.process(self.file_command_iter(path))
+
class TestImportToPackModify(TestCaseForGenericProcessor):
def file_command_iter(self, path, kind='file', content='aaa',