summaryrefslogtreecommitdiff
path: root/vcs-svn/fast_export.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-10-11 02:41:06 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2011-02-26 10:57:59 (GMT)
commite5e45ca1e35482d120a7ce776cf208369edcc459 (patch)
treebb050fff933928d0d54a66a2afeebab568ee636a /vcs-svn/fast_export.c
parentd350822fa7d14052713bea0ec62ff1246d8a2f7a (diff)
downloadgit-e5e45ca1e35482d120a7ce776cf208369edcc459.zip
git-e5e45ca1e35482d120a7ce776cf208369edcc459.tar.gz
git-e5e45ca1e35482d120a7ce776cf208369edcc459.tar.bz2
vcs-svn: teach line_buffer to handle multiple input files
Collect the line_buffer state in a newly public line_buffer struct. Callers can use multiple line_buffers to manage input from multiple files at a time. svn-fe's delta applier will use this to stream a delta from svnrdump and the preimage it applies to from fast-import at the same time. The tests don't take advantage of the new features, but I think that's okay. It is easier to find lingering examples of nonreentrant code by searching for "static" in line_buffer.c. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'vcs-svn/fast_export.c')
-rw-r--r--vcs-svn/fast_export.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 6cfa256..260cf50 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -63,14 +63,14 @@ void fast_export_commit(uint32_t revision, uint32_t author, char *log,
printf("progress Imported commit %"PRIu32".\n\n", revision);
}
-void fast_export_blob(uint32_t mode, uint32_t mark, uint32_t len)
+void fast_export_blob(uint32_t mode, uint32_t mark, uint32_t len, struct line_buffer *input)
{
if (mode == REPO_MODE_LNK) {
/* svn symlink blobs start with "link " */
- buffer_skip_bytes(5);
+ buffer_skip_bytes(input, 5);
len -= 5;
}
printf("blob\nmark :%"PRIu32"\ndata %"PRIu32"\n", mark, len);
- buffer_copy_bytes(len);
+ buffer_copy_bytes(input, len);
fputc('\n', stdout);
}