contrib git-resurrect: find traces of a branch name and resurrect it
[git/jnareb-git/bp-gitweb.git] / t / t9134-git-svn-ignore-paths.sh
blobc4b5b8bcf7949f8f60d5d80d6cd53e892b8743f2
1 #!/bin/sh
3 # Copyright (c) 2009 Vitaly Shukela
4 # Copyright (c) 2009 Eric Wong
7 test_description='git svn property tests'
8 . ./lib-git-svn.sh
10 test_expect_success 'setup test repository' '
11 svn co "$svnrepo" s &&
13 cd s &&
14 mkdir qqq www &&
15 echo test_qqq > qqq/test_qqq.txt &&
16 echo test_www > www/test_www.txt &&
17 svn add qqq &&
18 svn add www &&
19 svn commit -m "create some files" &&
20 svn up &&
21 echo hi >> www/test_www.txt &&
22 svn commit -m "modify www/test_www.txt" &&
23 svn up
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' '
36 cd s &&
37 echo b >> qqq/test_qqq.txt &&
38 svn commit -m "SVN-side change outside of www" &&
39 svn up &&
40 svn log -v | fgrep "SVN-side change outside of www"
44 test_expect_success 'update git svn-cloned repo' '
46 cd g &&
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 &&
51 rm expect expect2
55 test_expect_success 'SVN-side change inside of ignored www' '
57 cd s &&
58 echo zaq >> www/test_www.txt
59 svn commit -m "SVN-side change inside of www/test_www.txt" &&
60 svn up &&
61 svn log -v | fgrep "SVN-side change inside of www/test_www.txt"
65 test_expect_success 'update git svn-cloned repo' '
67 cd g &&
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 &&
72 rm expect expect2
76 test_expect_success 'SVN-side change in and out of ignored www' '
78 cd s &&
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" &&
82 svn up &&
83 svn log -v | fgrep "SVN-side change in and out of ignored www"
87 test_expect_success 'update git svn-cloned repo again' '
89 cd g &&
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 &&
94 rm expect expect2
98 test_done