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 <slamb@slamb.org>
This commit is contained in:
Scott Lamb
2007-07-16 01:31:00 -07:00
committed by Chris Lee
parent 9f234284a7
commit e1aa392c39

View File

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