Display an error from update-ref if target ref name is invalid.
[git/jnareb-git.git] / t / lib-git-svn.sh
blob29a1e72c61eb6e67a70c12361dada49fd77fad49
1 . ./test-lib.sh
3 if test -n "$NO_SVN_TESTS"
4 then
5 test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' :
6 test_done
7 exit
8 fi
10 GIT_DIR=$PWD/.git
11 GIT_SVN_DIR=$GIT_DIR/svn/git-svn
12 SVN_TREE=$GIT_SVN_DIR/svn-tree
14 perl -e 'use SVN::Core' >/dev/null 2>&1
15 if test $? -ne 0
16 then
17 echo 'Perl SVN libraries not found, tests requiring those will be skipped'
18 GIT_SVN_NO_LIB=1
21 svnadmin >/dev/null 2>&1
22 if test $? -ne 1
23 then
24 test_expect_success 'skipping git-svn tests, svnadmin not found' :
25 test_done
26 exit
29 svn >/dev/null 2>&1
30 if test $? -ne 1
31 then
32 test_expect_success 'skipping git-svn tests, svn not found' :
33 test_done
34 exit
37 svnrepo=$PWD/svnrepo
39 set -e
41 if svnadmin create --help | grep fs-type >/dev/null
42 then
43 svnadmin create --fs-type fsfs "$svnrepo"
44 else
45 svnadmin create "$svnrepo"
48 svnrepo="file://$svnrepo/test-git-svn"