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 # We override svnrdump by placing a symlink to the svnrdump-emulator in .
16 export PATH="$HOME:$PATH"
17 ln -sf $GIT_BUILD_DIR/contrib/svn-fe/svnrdump_sim.py "$HOME/svnrdump"
22 #git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
23 # let's reuse an exisiting dump file!?
24 git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
25 git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
28 if test -e "$GIT_BUILD_DIR/git-remote-testsvn"
30 test_set_prereq REMOTE_SVN
39 test_expect_success REMOTE_SVN 'simple fetch' '
42 test_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master &&
43 cp .git/refs/remotes/svnsim/master master.good
47 cat .git/refs/svn/svnsim/master
48 cat .git/refs/remotes/svnsim/master
51 test_expect_success REMOTE_SVN 'repeated fetch, nothing shall change' '
53 test_cmp master.good .git/refs/remotes/svnsim/master
56 test_expect_success REMOTE_SVN 'fetch from a file:// url gives the same result' '
60 test_expect_failure REMOTE_SVN 'the sha1 differ because the git-svn-id line in the commit msg contains the url' '
61 test_cmp .git/refs/remotes/svnfile/master .git/refs/remotes/svnsim/master
64 test_expect_success REMOTE_SVN 'mark-file regeneration' '
65 # filter out any other marks, that can not be regenerated. Only up to 3 digit revisions are allowed here
66 grep ":[0-9]\{1,3\} " $MARKSPATH/svnsim.marks > $MARKSPATH/svnsim.marks.old &&
67 rm $MARKSPATH/svnsim.marks &&
69 test_cmp $MARKSPATH/svnsim.marks.old $MARKSPATH/svnsim.marks
72 test_expect_success REMOTE_SVN 'incremental imports must lead to the same head' '
76 test_cmp .git/refs/svn/svnsim/master .git/refs/remotes/svnsim/master &&
79 test_cmp master.good .git/refs/remotes/svnsim/master
82 test_debug 'git branch -a'