]> git.ipfire.org Git - thirdparty/git.git/blobdiff - vcs-svn/svndump.c
remote-svn: add incremental import
[thirdparty/git.git] / vcs-svn / svndump.c
index 7ec1a5b99381f4de02b74bf33760db5a9251858d..31d1d83d451e0e78f19067799d14e555a62e2cc8 100644 (file)
@@ -309,20 +309,20 @@ static void begin_revision(const char *remote_ref)
                rev_ctx.timestamp, remote_ref);
 }
 
-static void end_revision(void)
+static void end_revision(const char *note_ref)
 {
        struct strbuf mark = STRBUF_INIT;
        if (rev_ctx.revision) {
                fast_export_end_commit(rev_ctx.revision);
                fast_export_begin_note(rev_ctx.revision, "remote-svn",
-                               "Note created by remote-svn.", rev_ctx.timestamp);
+                               "Note created by remote-svn.", rev_ctx.timestamp, note_ref);
                strbuf_addf(&mark, ":%"PRIu32, rev_ctx.revision);
                fast_export_note(mark.buf, "inline");
                fast_export_buf_to_data(&rev_ctx.note);
        }
 }
 
-void svndump_read(const char *url, const char *local_ref)
+void svndump_read(const char *url, const char *local_ref, const char *notes_ref)
 {
        char *val;
        char *t;
@@ -363,7 +363,7 @@ void svndump_read(const char *url, const char *local_ref)
                        if (active_ctx == REV_CTX)
                                begin_revision(local_ref);
                        if (active_ctx != DUMP_CTX)
-                               end_revision();
+                               end_revision(notes_ref);
                        active_ctx = REV_CTX;
                        reset_rev_ctx(atoi(val));
                        strbuf_addf(&rev_ctx.note, "%s\n", t);
@@ -479,7 +479,7 @@ void svndump_read(const char *url, const char *local_ref)
        if (active_ctx == REV_CTX)
                begin_revision(local_ref);
        if (active_ctx != DUMP_CTX)
-               end_revision();
+               end_revision(notes_ref);
 }
 
 static void init(int report_fd)