3 # Copyright (c) 2009 Vitaly Shukela
4 # Copyright (c) 2009 Eric Wong
7 test_description
='git svn property tests'
10 test_expect_success
'setup test repository' '
11 svn co "$svnrepo" s &&
15 echo test_qqq > qqq/test_qqq.txt &&
16 echo test_www > www/test_www.txt &&
19 svn commit -m "create some files" &&
21 echo hi >> www/test_www.txt &&
22 svn commit -m "modify www/test_www.txt" &&
27 test_expect_success
'clone an SVN repository with ignored www directory' '
28 git svn clone --ignore-paths="^www" "$svnrepo" g &&
29 echo test_qqq > expect &&
30 for i in g/*/*.txt; do cat $i >> expect2; done &&
31 test_cmp expect expect2
34 test_expect_success
'SVN-side change outside of www' '
37 echo b >> qqq/test_qqq.txt &&
38 svn commit -m "SVN-side change outside of www" &&
40 svn log -v | fgrep "SVN-side change outside of www"
44 test_expect_success
'update git svn-cloned repo' '
47 git svn rebase --ignore-paths="^www" &&
48 printf "test_qqq\nb\n" > expect &&
49 for i in */*.txt; do cat $i >> expect2; done &&
50 test_cmp expect2 expect &&
55 test_expect_success
'SVN-side change inside of ignored www' '
58 echo zaq >> www/test_www.txt
59 svn commit -m "SVN-side change inside of www/test_www.txt" &&
61 svn log -v | fgrep "SVN-side change inside of www/test_www.txt"
65 test_expect_success
'update git svn-cloned repo' '
68 git svn rebase --ignore-paths="^www" &&
69 printf "test_qqq\nb\n" > expect &&
70 for i in */*.txt; do cat $i >> expect2; done &&
71 test_cmp expect2 expect &&
76 test_expect_success
'SVN-side change in and out of ignored www' '
79 echo cvf >> www/test_www.txt
80 echo ygg >> qqq/test_qqq.txt
81 svn commit -m "SVN-side change in and out of ignored www" &&
83 svn log -v | fgrep "SVN-side change in and out of ignored www"
87 test_expect_success
'update git svn-cloned repo again' '
90 git svn rebase --ignore-paths="^www" &&
91 printf "test_qqq\nb\nygg\n" > expect &&
92 for i in */*.txt; do cat $i >> expect2; done &&
93 test_cmp expect2 expect &&