]> git.ipfire.org Git - thirdparty/git.git/blob - contrib/git-svn/t/t0004-follow-parent.sh
Merge branch 'ew/instaweb'
[thirdparty/git.git] / contrib / git-svn / t / t0004-follow-parent.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2006 Eric Wong
4 #
5
6 test_description='git-svn --follow-parent fetching'
7 . ./lib-git-svn.sh
8
9 if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
10 then
11 echo 'Skipping: --follow-parent needs SVN libraries'
12 test_done
13 exit 0
14 fi
15
16 test_expect_success 'initialize repo' "
17 mkdir import &&
18 cd import &&
19 mkdir -p trunk &&
20 echo hello > trunk/readme &&
21 svn import -m 'initial' . $svnrepo &&
22 cd .. &&
23 svn co $svnrepo wc &&
24 cd wc &&
25 echo world >> trunk/readme &&
26 svn commit -m 'another commit' &&
27 svn up &&
28 svn mv -m 'rename to thunk' trunk thunk &&
29 svn up &&
30 echo goodbye >> thunk/readme &&
31 svn commit -m 'bye now' &&
32 cd ..
33 "
34
35 test_expect_success 'init and fetch --follow-parent a moved directory' "
36 git-svn init -i thunk $svnrepo/thunk &&
37 git-svn fetch --follow-parent -i thunk &&
38 git-rev-parse --verify refs/remotes/trunk &&
39 test '$?' -eq '0'
40 "
41
42 test_debug 'gitk --all &'
43
44 test_done