2010-08-10 00:55:00 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
test_description='check svn dumpfile importer'
|
|
|
|
|
2010-10-11 05:00:40 +02:00
|
|
|
. ./test-lib.sh
|
2010-08-10 00:55:00 +02:00
|
|
|
|
2010-12-09 07:53:59 +01:00
|
|
|
if ! svnadmin -h >/dev/null 2>&1
|
|
|
|
then
|
|
|
|
skip_all='skipping svn-fe tests, svn not available'
|
|
|
|
test_done
|
|
|
|
fi
|
|
|
|
|
2010-10-11 05:00:40 +02:00
|
|
|
svnconf=$PWD/svnconf
|
|
|
|
export svnconf
|
|
|
|
|
|
|
|
svn_cmd () {
|
|
|
|
subcommand=$1 &&
|
|
|
|
shift &&
|
|
|
|
mkdir -p "$svnconf" &&
|
|
|
|
svn "$subcommand" --config-dir "$svnconf" "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
test_dump () {
|
2010-08-10 00:55:00 +02:00
|
|
|
label=$1
|
|
|
|
dump=$2
|
|
|
|
test_expect_success "$dump" '
|
|
|
|
svnadmin create "$label-svn" &&
|
|
|
|
svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
|
2010-08-14 02:04:50 +02:00
|
|
|
svn_cmd export "file://$PWD/$label-svn" "$label-svnco" &&
|
2010-08-10 00:55:00 +02:00
|
|
|
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
|
|
|
|
)
|
|
|
|
'
|
|
|
|
}
|
|
|
|
|
2010-08-14 02:06:15 +02:00
|
|
|
test_dump simple t9135/svn.dump
|
2010-08-10 00:55:00 +02:00
|
|
|
|
|
|
|
test_done
|