Merge branch 'bc/vcs-svn-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Sun, 27 Aug 2017 05:55:05 +0000 (22:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Aug 2017 05:55:05 +0000 (22:55 -0700)
Code clean-up.

* bc/vcs-svn-cleanup:
vcs-svn: rename repo functions to "svn_repo"
vcs-svn: remove unused prototypes

vcs-svn/repo_tree.c
vcs-svn/repo_tree.h
vcs-svn/svndump.c
index 67d27f0b6ca95ad62f95bb6c4fb38c58065dc8f0..d77cb0ada7184296f8975e376e38f21d6fd82054 100644 (file)
@@ -8,7 +8,7 @@
 #include "repo_tree.h"
 #include "fast_export.h"
 
-const char *repo_read_path(const char *path, uint32_t *mode_out)
+const char *svn_repo_read_path(const char *path, uint32_t *mode_out)
 {
        int err;
        static struct strbuf buf = STRBUF_INIT;
@@ -25,7 +25,7 @@ const char *repo_read_path(const char *path, uint32_t *mode_out)
        return buf.buf;
 }
 
-void repo_copy(uint32_t revision, const char *src, const char *dst)
+void svn_repo_copy(uint32_t revision, const char *src, const char *dst)
 {
        int err;
        uint32_t mode;
@@ -42,7 +42,7 @@ void repo_copy(uint32_t revision, const char *src, const char *dst)
        fast_export_modify(dst, mode, data.buf);
 }
 
-void repo_delete(const char *path)
+void svn_repo_delete(const char *path)
 {
        fast_export_delete(path);
 }
index 889c6a3c954375ab167f8b77b9f9a64dd0ccc2aa..555b64bbb6bddc4c580a44834f05912a3c897635 100644 (file)
@@ -9,15 +9,8 @@ struct strbuf;
 #define REPO_MODE_LNK 0120000
 
 uint32_t next_blob_mark(void);
-void repo_copy(uint32_t revision, const char *src, const char *dst);
-void repo_add(const char *path, uint32_t mode, uint32_t blob_mark);
-const char *repo_read_path(const char *path, uint32_t *mode_out);
-void repo_delete(const char *path);
-void repo_commit(uint32_t revision, const char *author,
-               const struct strbuf *log, const char *uuid, const char *url,
-               long unsigned timestamp);
-void repo_diff(uint32_t r1, uint32_t r2);
-void repo_init(void);
-void repo_reset(void);
+void svn_repo_copy(uint32_t revision, const char *src, const char *dst);
+const char *svn_repo_read_path(const char *path, uint32_t *mode_out);
+void svn_repo_delete(const char *path);
 
 #endif
index 1846685a21a44decfe5790f0020dcf933c8d6583..37c4a36b921a4dc5c6c370b08c03441c83590d45 100644 (file)
@@ -225,15 +225,15 @@ static void handle_node(void)
                if (have_text || have_props || node_ctx.srcRev)
                        die("invalid dump: deletion node has "
                                "copyfrom info, text, or properties");
-               repo_delete(node_ctx.dst.buf);
+               svn_repo_delete(node_ctx.dst.buf);
                return;
        }
        if (node_ctx.action == NODEACT_REPLACE) {
-               repo_delete(node_ctx.dst.buf);
+               svn_repo_delete(node_ctx.dst.buf);
                node_ctx.action = NODEACT_ADD;
        }
        if (node_ctx.srcRev) {
-               repo_copy(node_ctx.srcRev, node_ctx.src.buf, node_ctx.dst.buf);
+               svn_repo_copy(node_ctx.srcRev, node_ctx.src.buf, node_ctx.dst.buf);
                if (node_ctx.action == NODEACT_ADD)
                        node_ctx.action = NODEACT_CHANGE;
        }
@@ -249,7 +249,7 @@ static void handle_node(void)
                old_data = NULL;
        } else if (node_ctx.action == NODEACT_CHANGE) {
                uint32_t mode;
-               old_data = repo_read_path(node_ctx.dst.buf, &mode);
+               old_data = svn_repo_read_path(node_ctx.dst.buf, &mode);
                if (mode == REPO_MODE_DIR && type != REPO_MODE_DIR)
                        die("invalid dump: cannot modify a directory into a file");
                if (mode != REPO_MODE_DIR && type == REPO_MODE_DIR)