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>,
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Subject: [RFC 5/5] vcs-svn: remove repo_tree
Date: Fri, 17 Aug 2012 22:40:10 +0200 [thread overview]
Message-ID: <1345236010-1648-6-git-send-email-florian.achleitner.2.6.31@gmail.com> (raw)
In-Reply-To: <1345236010-1648-5-git-send-email-florian.achleitner.2.6.31@gmail.com>
Rewritten svndump.c left only very little functionlity in repo_tree.c
which could easily be inlined. Let's remove it.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
---
Makefile | 1 -
vcs-svn/repo_tree.c | 48 ------------------------------------------------
vcs-svn/repo_tree.h | 14 --------------
3 files changed, 63 deletions(-)
delete mode 100644 vcs-svn/repo_tree.c
diff --git a/Makefile b/Makefile
index 6b0c961..aea877d 100644
--- a/Makefile
+++ b/Makefile
@@ -2187,7 +2187,6 @@ XDIFF_OBJS += xdiff/xhistogram.o
VCSSVN_OBJS += vcs-svn/line_buffer.o
VCSSVN_OBJS += vcs-svn/sliding_window.o
-VCSSVN_OBJS += vcs-svn/repo_tree.o
VCSSVN_OBJS += vcs-svn/fast_export.o
VCSSVN_OBJS += vcs-svn/svndiff.o
VCSSVN_OBJS += vcs-svn/svndump.o
diff --git a/vcs-svn/repo_tree.c b/vcs-svn/repo_tree.c
deleted file mode 100644
index 67d27f0..0000000
--- a/vcs-svn/repo_tree.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed under a two-clause BSD-style license.
- * See LICENSE for details.
- */
-
-#include "git-compat-util.h"
-#include "strbuf.h"
-#include "repo_tree.h"
-#include "fast_export.h"
-
-const char *repo_read_path(const char *path, uint32_t *mode_out)
-{
- int err;
- static struct strbuf buf = STRBUF_INIT;
-
- strbuf_reset(&buf);
- err = fast_export_ls(path, mode_out, &buf);
- if (err) {
- if (errno != ENOENT)
- die_errno("BUG: unexpected fast_export_ls error");
- /* Treat missing paths as directories. */
- *mode_out = REPO_MODE_DIR;
- return NULL;
- }
- return buf.buf;
-}
-
-void repo_copy(uint32_t revision, const char *src, const char *dst)
-{
- int err;
- uint32_t mode;
- static struct strbuf data = STRBUF_INIT;
-
- strbuf_reset(&data);
- err = fast_export_ls_rev(revision, src, &mode, &data);
- if (err) {
- if (errno != ENOENT)
- die_errno("BUG: unexpected fast_export_ls_rev error");
- fast_export_delete(dst);
- return;
- }
- fast_export_modify(dst, mode, data.buf);
-}
-
-void repo_delete(const char *path)
-{
- fast_export_delete(path);
-}
diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h
index 889c6a3..6d0f51e 100644
--- a/vcs-svn/repo_tree.h
+++ b/vcs-svn/repo_tree.h
@@ -1,23 +1,9 @@
#ifndef REPO_TREE_H_
#define REPO_TREE_H_
-struct strbuf;
-
#define REPO_MODE_DIR 0040000
#define REPO_MODE_BLB 0100644
#define REPO_MODE_EXE 0100755
#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);
-
#endif
--
1.7.9.5
next prev parent 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 ` [RFC 2/5] svndump: move struct definitions to .h Florian Achleitner
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 ` Florian Achleitner [this message]
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-6-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).