From e605164d1da51087882a468bcf3f5d36d3a9d4ba Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 15 Jul 2010 18:25:39 +0200 Subject: Add a sample user for the svndump library The svn-fe tool takes a Subversion dump file as input and produces a fast-import stream as output. This can be useful as a low-level tool in building other importers, or for debugging the vcs-svn library. make svn-fe make svn-fe.1 to test. Signed-off-by: Jonathan Nieder Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- contrib/svn-fe/svn-fe.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contrib/svn-fe/svn-fe.c (limited to 'contrib/svn-fe/svn-fe.c') diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c new file mode 100644 index 0000000000..43c4320cac --- /dev/null +++ b/contrib/svn-fe/svn-fe.c @@ -0,0 +1,15 @@ +/* + * This file is in the public domain. + * You may freely use, modify, distribute, and relicense it. + */ + +#include +#include "vcs-svn/svndump.h" + +int main(int argc, char **argv) +{ + svndump_init(NULL); + svndump_read((argc > 1) ? argv[1] : NULL); + svndump_reset(); + return 0; +} -- cgit v1.2.1 From 199f5498741f3792e49c211f27333a426d2b11aa Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Thu, 29 Jul 2010 11:06:19 +0530 Subject: contrib/svn-fe: Fix IncludePath Include the path "../../vcs-svn" while compiling it in the Makefile and change svn-fe.c to include svndump.h. Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- contrib/svn-fe/svn-fe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/svn-fe/svn-fe.c') diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c index 43c4320cac..e9b9ba4da4 100644 --- a/contrib/svn-fe/svn-fe.c +++ b/contrib/svn-fe/svn-fe.c @@ -4,7 +4,7 @@ */ #include -#include "vcs-svn/svndump.h" +#include "svndump.h" int main(int argc, char **argv) { -- cgit v1.2.1 From 21746aa34fc99d2c73634bc9829387c27c109dbe Mon Sep 17 00:00:00 2001 From: David Barr Date: Mon, 9 Aug 2010 17:55:00 -0500 Subject: SVN dump parser svndump parses data that is in SVN dumpfile format produced by `svnadmin dump` with the help of line_buffer and uses repo_tree and fast_export to emit a git fast-import stream. Based roughly on com.hydrografix.svndump 0.92 from the SvnToCCase project at , by Stefan Hegny and others. [rr: allow input from files other than stdin] [jn: with test, more error reporting] Signed-off-by: David Barr Signed-off-by: Ramkumar Ramachandra Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- contrib/svn-fe/svn-fe.c | 1 + 1 file changed, 1 insertion(+) (limited to 'contrib/svn-fe/svn-fe.c') diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c index e9b9ba4da4..a2677b03e0 100644 --- a/contrib/svn-fe/svn-fe.c +++ b/contrib/svn-fe/svn-fe.c @@ -10,6 +10,7 @@ int main(int argc, char **argv) { svndump_init(NULL); svndump_read((argc > 1) ? argv[1] : NULL); + svndump_deinit(); svndump_reset(); return 0; } -- cgit v1.2.1 From 5c28a8b054cb69a37638b0261fc370422c8fab58 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 19 Nov 2010 18:46:06 -0600 Subject: vcs-svn: Check for errors from open() test-svn-fe segfaults when passed a bogus path. Simplify debugging by exiting with a meaningful error message instead. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- contrib/svn-fe/svn-fe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/svn-fe/svn-fe.c') diff --git a/contrib/svn-fe/svn-fe.c b/contrib/svn-fe/svn-fe.c index a2677b03e0..35db24f5ea 100644 --- a/contrib/svn-fe/svn-fe.c +++ b/contrib/svn-fe/svn-fe.c @@ -8,7 +8,8 @@ int main(int argc, char **argv) { - svndump_init(NULL); + if (svndump_init(NULL)) + return 1; svndump_read((argc > 1) ? argv[1] : NULL); svndump_deinit(); svndump_reset(); -- cgit v1.2.1