From f5fca7c6944e92206a5488aecb81779fd52bfdd1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 1 Mar 2012 22:17:18 +0100 Subject: Print sane error when a fastimport file is incomplete. --- tests/test_commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_commands.py') diff --git a/tests/test_commands.py b/tests/test_commands.py index 5053416..88fefd2 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -228,6 +228,16 @@ class TestFastImport(ExternalBase): data = self.run_bzr("fast-import file.fi br")[0] self.assertEquals(1, tree.branch.revno()) + def test_missing_bytes(self): + self.build_tree_contents([('empty.fi', """ +commit refs/heads/master +mark :1 +committer +data 15 +""")]) + self.make_branch_and_tree("br") + self.run_bzr_error(['bzr: ERROR: 4: Parse error: line 4: Command commit is missing section committer\n'], "fast-import empty.fi br") + class TestFastImportFilter(ExternalBase): -- cgit v1.2.1