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" &&
echo Hello world >> kw.c &&
+ poke kw.c &&
svn commit -m "Modified file, but still not yet an Id" &&
svn propset svn:keywords Id kw.c &&
- svn commit -m "Propset Id"
+ poke kw.c &&
+ svn commit -m "Propset Id" &&
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 empty &&
svn propset svn:eol-style CR crlf &&
svn propset svn:eol-style CR ne_crlf &&
- svn commit -m "propset CR on crlf files"
+ svn commit -m "propset CR on crlf files" &&
cd ..'
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
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