mirror of
https://github.com/git/git.git
synced 2024-11-05 00:37:55 +01:00
8e9d453ce7
Running test t9010 without svn currently errors out for no good reason.
The test uses "svnadmin" without checking if svn is available. This was a
regression introduced by b0ad24b
(t9010 (svn-fe): Eliminate dependency on
svn perl bindings, 2010-10-10) when it stopped including ./lib-git-svn.sh
that had the safety.
This should fix it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
48 lines
888 B
Bash
Executable file
48 lines
888 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='check svn dumpfile importer'
|
|
|
|
. ./test-lib.sh
|
|
|
|
if ! svnadmin -h >/dev/null 2>&1
|
|
then
|
|
skip_all='skipping svn-fe tests, svn not available'
|
|
test_done
|
|
fi
|
|
|
|
svnconf=$PWD/svnconf
|
|
export svnconf
|
|
|
|
svn_cmd () {
|
|
subcommand=$1 &&
|
|
shift &&
|
|
mkdir -p "$svnconf" &&
|
|
svn "$subcommand" --config-dir "$svnconf" "$@"
|
|
}
|
|
|
|
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 t9135/svn.dump
|
|
|
|
test_done
|