From: Scott Lamb Date: Mon, 16 Jul 2007 08:31:00 +0000 (-0700) Subject: This prevents invalid command errors caused by bytes not being flushed to X-Git-Url: http://crossforests.com/gitweb?a=commitdiff_plain;h=e1aa392c397b9a10c6e6cbcf50a3efd99319978f;p=python%2Ffast-export.git This prevents invalid command errors caused by bytes not being flushed to git-fastimport in the same order as they were written to the buffer. Signed-off-by: Scott Lamb --- diff --git a/svn-fast-export.py b/svn-fast-export.py index a2304c7..77496f1 100755 --- a/svn-fast-export.py +++ b/svn-fast-export.py @@ -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")