This prevents invalid command errors caused by bytes not being flushed to
authorScott Lamb <slamb@slamb.org>
Mon, 16 Jul 2007 08:31:00 +0000 (01:31 -0700)
committerChris Lee <clee@kde.org>
Mon, 16 Jul 2007 08:34:49 +0000 (01:34 -0700)
git-fastimport in the same order as they were written to the buffer.

Signed-off-by: Scott Lamb <slamb@slamb.org>
svn-fast-export.py

index a2304c7..77496f1 100755 (executable)
@@ -28,8 +28,10 @@ def dump_file_blob(root, full_path, pool):
     stream_length = svn_fs_file_length(root, full_path, pool)
     stream = svn_fs_file_contents(root, full_path, pool)
     sys.stdout.write("data %s\n" % stream_length)
+    sys.stdout.flush()
     ostream = svn_stream_for_stdout(pool)
     svn_stream_copy(stream, ostream, pool)
+    svn_stream_close(ostream)
     sys.stdout.write("\n")