test_expect_success 'setup some commits to svn' \
'cd test_wc &&
echo Greetings >> kw.c &&
+ poke kw.c &&
svn commit -m "Not yet an Id" &&
- svn up &&
echo Hello world >> kw.c &&
+ poke kw.c &&
svn commit -m "Modified file, but still not yet an Id" &&
- svn up &&
svn propset svn:keywords Id kw.c &&
+ poke kw.c &&
svn commit -m "Propset Id" &&
- svn up &&
cd ..'
test_expect_success 'initialize git-svn' "git-svn init $svnrepo"
test_expect_success "$name" \
'git checkout -b mybranch remotes/git-svn &&
echo Hi again >> kw.c &&
- git commit -a -m "test keywoards ignoring" &&
+ git commit -a -m "test keywords ignoring" &&
git-svn set-tree remotes/git-svn..mybranch &&
git pull . remotes/git-svn'
svn propset svn:eol-style CR crlf &&
svn propset svn:eol-style CR ne_crlf &&
svn commit -m "propset CR on crlf files" &&
- svn up &&
cd ..'
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
svn propset svn:eol-style CRLF ne_cr &&
svn propset svn:keywords Id cr &&
svn propset svn:keywords Id ne_cr &&
- svn commit -m "propset CRLF on cr files" &&
- svn up'
+ svn commit -m "propset CRLF on cr files"'
cd ..
test_expect_success 'fetch and pull latest from svn' \
'git-svn fetch && git pull . remotes/git-svn'
test_expect_success 'CRLF + $Id$' "test '$a_cr' = '$b_cr'"
test_expect_success 'CRLF + $Id$ (no newline)' "test '$a_ne_cr' = '$b_ne_cr'"
+cat > show-ignore.expect <<\EOF
+
+# /
+/no-such-file*
+
+# deeply
+/deeply/no-such-file*
+
+# deeply/nested
+/deeply/nested/no-such-file*
+
+# deeply/nested/directory
+/deeply/nested/directory/no-such-file*
+EOF
+
+test_expect_success 'test show-ignore' "
+ cd test_wc &&
+ mkdir -p deeply/nested/directory &&
+ svn add deeply &&
+ svn propset -R svn:ignore 'no-such-file*' .
+ svn commit -m 'propset svn:ignore'
+ cd .. &&
+ git-svn show-ignore > show-ignore.got &&
+ cmp show-ignore.expect show-ignore.got
+ "
+
test_done