3 test_description
='tests remote-svn'
7 MARKSPATH
=.git
/info
/fast-import
/remote-svn
9 if ! test_have_prereq PYTHON
11 skip_all
='skipping remote-svn tests, python not available'
15 # Override svnrdump with our simulator
17 export PATH PYTHON_PATH GIT_BUILD_DIR
19 write_script
"$HOME/svnrdump" <<\EOF
20 exec "$PYTHON_PATH" "$GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py" "$@"
26 #git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
27 # let's reuse an existing dump file!?
28 git remote add svnsim testsvn
::sim
://$TEST_DIRECTORY/t9154
/svn.dump
29 git remote add svnfile testsvn
::file://$TEST_DIRECTORY/t9154
/svn.dump
32 if test -e "$GIT_BUILD_DIR/git-remote-testsvn"
34 test_set_prereq REMOTE_SVN
43 test_expect_success REMOTE_SVN
'simple fetch' '
46 test_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master &&
47 cp .git/refs/remotes/svnsim/master master.good
51 cat .git/refs/svn/svnsim/master
52 cat .git/refs/remotes/svnsim/master
55 test_expect_success REMOTE_SVN
'repeated fetch, nothing shall change' '
57 test_cmp master.good .git/refs/remotes/svnsim/master
60 test_expect_success REMOTE_SVN
'fetch from a file:// url gives the same result' '
64 test_expect_failure REMOTE_SVN
'the sha1 differ because the git-svn-id line in the commit msg contains the url' '
65 test_cmp .git/refs/remotes/svnfile/master .git/refs/remotes/svnsim/master
68 test_expect_success REMOTE_SVN
'mark-file regeneration' '
69 # filter out any other marks, that can not be regenerated. Only up to 3 digit revisions are allowed here
70 grep ":[0-9]\{1,3\} " $MARKSPATH/svnsim.marks > $MARKSPATH/svnsim.marks.old &&
71 rm $MARKSPATH/svnsim.marks &&
73 test_cmp $MARKSPATH/svnsim.marks.old $MARKSPATH/svnsim.marks
76 test_expect_success REMOTE_SVN
'incremental imports must lead to the same head' '
81 test_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master &&
84 test_cmp master.good .git/refs/remotes/svnsim/master
87 test_debug
'git branch -a'