aboutsummaryrefslogtreecommitdiff
path: root/t/t9010-svn-fe.sh
diff options
context:
space:
mode:
authorDavid Barr <david.barr@cordelta.com>2010-08-09 17:55:00 -0500
committerJunio C Hamano <gitster@pobox.com>2010-08-14 19:35:38 -0700
commit21746aa34fc99d2c73634bc9829387c27c109dbe (patch)
treeb29044890c890a830b179c20f363d3c7c9e2a531 /t/t9010-svn-fe.sh
parentc0e6c23dca84227167a6fe1077503ddf32208919 (diff)
downloadgit-21746aa34fc99d2c73634bc9829387c27c109dbe.tar.gz
git-21746aa34fc99d2c73634bc9829387c27c109dbe.tar.xz
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 <http://svn2cc.sarovar.org/>, by Stefan Hegny and others. [rr: allow input from files other than stdin] [jn: with test, more error reporting] Signed-off-by: David Barr <david.barr@cordelta.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9010-svn-fe.sh')
-rw-r--r--t/t9010-svn-fe.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh
new file mode 100644
index 000000000..bf9bbd6a4
--- /dev/null
+++ b/t/t9010-svn-fe.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+test_description='check svn dumpfile importer'
+
+. ./lib-git-svn.sh
+
+test_dump() {
+ label=$1
+ dump=$2
+ test_expect_success "$dump" '
+ svnadmin create "$label-svn" &&
+ svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
+ svn_cmd export "file://$(pwd)/$label-svn" "$label-svnco" &&
+ git init "$label-git" &&
+ test-svn-fe "$TEST_DIRECTORY/$dump" >"$label.fe" &&
+ (
+ cd "$label-git" &&
+ git fast-import < ../"$label.fe"
+ ) &&
+ (
+ cd "$label-svnco" &&
+ git init &&
+ git add . &&
+ git fetch "../$label-git" master &&
+ git diff --exit-code FETCH_HEAD
+ )
+ '
+}
+
+test_dump simple t9111/svnsync.dump
+
+test_done