git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
To: git@vger.kernel.org
Cc: David Michael Barr <b@rr-dav.id.au>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: [RFC 2/5] svndump: move struct definitions to .h.
Date: Fri, 17 Aug 2012 22:40:07 +0200	[thread overview]
Message-ID: <1345236010-1648-3-git-send-email-florian.achleitner.2.6.31@gmail.com> (raw)
In-Reply-To: <1345236010-1648-2-git-send-email-florian.achleitner.2.6.31@gmail.com>

This is a preparation for adding branch detection code in seperate
.c files.
External branch detection functions will need to use these.
---
 vcs-svn/svndump.c |   19 +++----------------
 vcs-svn/svndump.h |   19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 7592c8e..296be8c 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 node_ctx_t node_ctx;
+static struct rev_ctx_t rev_ctx;
+static struct dump_ctx_t dump_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 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

  reply	other threads:[~2012-08-17 20:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 20:40 [RFC 1/5] GSOC: prepare svndump for branch detection Florian Achleitner
2012-08-17 20:40 ` [RFC 1/5] vcs-svn: Add sha1 calculaton to fast_export and line_buffer Florian Achleitner
2012-08-17 20:40   ` Florian Achleitner [this message]
2012-08-17 20:40     ` [RFC 3/5] vcs-svn/svndump: restructure node_ctx, rev_ctx handling Florian Achleitner
2012-08-17 20:40       ` [RFC 4/5] vcs-svn/svndump: rewrite handle_node(), begin|end_revision() Florian Achleitner
2012-08-17 20:40         ` [RFC 5/5] vcs-svn: remove repo_tree Florian Achleitner
2012-08-18 18:37 ` [RFC 1/5] GSOC: prepare svndump for branch detection David Michael Barr
2012-08-20  6:26   ` Florian Achleitner
2012-08-20  6:57     ` Junio C Hamano
2012-08-20 13:35       ` Florian Achleitner
2012-08-20 16:45         ` Jonathan Nieder
2012-08-20 17:43           ` Florian Achleitner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345236010-1648-3-git-send-email-florian.achleitner.2.6.31@gmail.com \
    --to=florian.achleitner.2.6.31@gmail.com \
    --cc=b@rr-dav.id.au \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).