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

[RFC 5/5] vcs-svn: remove repo_tree

From
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Date
Aug 17, 2012, 20:40 UTC
Message-ID
<1345236010-1648-6-git-send-email-florian.achleitner.2.6.31@gmail.com>
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
Previous: Florian AchleitnerNext: David Michael Barr
Message 6 of 12 in “[RFC 1/5] GSOC: prepare svndump for branch detection”
  1. Florian AchleitnerAug 17, 2012
  2. 1/5 vcs-svn: Add sha1 calculaton to fast_export and line_buffer.Florian Achleitner, Aug 17, 2012
  3. 2/5 svndump: move struct definitions to .h.Florian Achleitner, Aug 17, 2012
  4. 3/5 vcs-svn/svndump: restructure node_ctx, rev_ctx handlingFlorian Achleitner, Aug 17, 2012
  5. 4/5 vcs-svn/svndump: rewrite handle_node(), begin|end_revision()Florian Achleitner, Aug 17, 2012
  6. 5/5 vcs-svn: remove repo_treeFlorian Achleitner, Aug 17, 2012
  7. David Michael BarrAug 18, 2012
  8. Florian AchleitnerAug 20, 2012
  9. Junio C HamanoAug 20, 2012
  10. Florian AchleitnerAug 20, 2012
  11. Jonathan NiederAug 20, 2012
  12. Florian AchleitnerAug 20, 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.