git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC v2 1/4] svndump: move struct definitions to .h

From
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Date
Aug 28, 2012, 09:15 UTC
Message-ID
<1346145304-27149-2-git-send-email-florian.achleitner.2.6.31@gmail.com>
In-Reply-To
<1346145304-27149-1-git-send-email-florian.achleitner.2.6.31@gmail.com>

This is a preparation for adding branch detection code in separate .c files.

External branch detection functions will need to use these.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 vcs-svn/svndump.c |   21 ++++-----------------
 vcs-svn/svndump.h |   19 +++++++++++++++++++
 2 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 31d1d83..6ca94de 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -38,23 +38,10 @@
 
 static struct line_buffer input = LINE_BUFFER_INIT;
 
-static struct {
-	uint32_t action, srcRev, type;
-	off_t prop_length, text_length;
-	struct strbuf src, dst;
-	uint32_t text_delta, prop_delta;
-} node_ctx;
-
-static struct {
-	uint32_t revision;
-	unsigned long timestamp;
-	struct strbuf log, author, note;
-} rev_ctx;
-
-static struct {
-	uint32_t version;
-	struct strbuf uuid, url;
-} dump_ctx;
+static struct node_ctx_t node_ctx;
+static struct rev_ctx_t rev_ctx;
+static struct dump_ctx_t dump_ctx;
+
 
 static void reset_node_ctx(char *fname)
 {
diff --git a/vcs-svn/svndump.h b/vcs-svn/svndump.h
index b8eb129..d545453 100644
--- a/vcs-svn/svndump.h
+++ b/vcs-svn/svndump.h
@@ -1,5 +1,6 @@
 #ifndef SVNDUMP_H_
 #define SVNDUMP_H_
+#include "cache.h"
 
 int svndump_init(const char *filename);
 int svndump_init_fd(int in_fd, int back_fd);
@@ -7,4 +8,22 @@ void svndump_read(const char *url, const char *local_ref, const char *notes_ref)
 void svndump_deinit(void);
 void svndump_reset(void);
 
+struct node_ctx_t {
+	uint32_t action, srcRev, type;
+	off_t prop_length, text_length;
+	struct strbuf src, dst;
+	uint32_t text_delta, prop_delta;
+};
+
+struct rev_ctx_t {
+	uint32_t revision;
+	unsigned long timestamp;
+	struct strbuf log, author, note;
+};
+
+struct dump_ctx_t {
+	uint32_t version;
+	struct strbuf uuid, url;
+};
+
 #endif
-- 
1.7.9.5
Previous: Florian AchleitnerNext: Florian Achleitner
Message 2 of 5 in “[RFC v2 0/4] GSOC: prepare svndump for branch detection”
  1. Florian AchleitnerAug 28, 2012
  2. 1/4 svndump: move struct definitions to .hFlorian Achleitner, Aug 28, 2012
  3. 2/4 vcs-svn/svndump: restructure node_ctx, rev_ctx handlingFlorian Achleitner, Aug 28, 2012
  4. 3/4 vcs-svn/svndump: rewrite handle_node(), begin|end_revision()Florian Achleitner, Aug 28, 2012
  5. 4/4 vcs-svn: remove repo_treeFlorian Achleitner, Aug 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.