2007-01-16 02:31:49 +01:00
|
|
|
#!/bin/sh
|
2006-06-20 02:59:35 +02:00
|
|
|
test_description='git-svn rmdir'
|
|
|
|
. ./lib-git-svn.sh
|
|
|
|
|
2008-05-04 07:37:59 +02:00
|
|
|
test_expect_success 'initialize repo' '
|
2006-06-20 02:59:35 +02:00
|
|
|
mkdir import &&
|
|
|
|
cd import &&
|
|
|
|
mkdir -p deeply/nested/directory/number/1 &&
|
|
|
|
mkdir -p deeply/nested/directory/number/2 &&
|
|
|
|
echo foo > deeply/nested/directory/number/1/file &&
|
|
|
|
echo foo > deeply/nested/directory/number/2/another &&
|
2008-05-04 07:37:59 +02:00
|
|
|
svn import -m "import for git-svn" . "$svnrepo" &&
|
2006-06-20 02:59:35 +02:00
|
|
|
cd ..
|
2008-05-04 07:37:59 +02:00
|
|
|
'
|
2006-06-20 02:59:35 +02:00
|
|
|
|
2008-05-04 07:37:59 +02:00
|
|
|
test_expect_success 'mirror via git-svn' '
|
|
|
|
git-svn init "$svnrepo" &&
|
2006-06-20 02:59:35 +02:00
|
|
|
git-svn fetch &&
|
2008-09-08 12:02:05 +02:00
|
|
|
git checkout -f -b test-rmdir ${remotes_git_svn}
|
2008-05-04 07:37:59 +02:00
|
|
|
'
|
2006-06-20 02:59:35 +02:00
|
|
|
|
2008-05-04 07:37:59 +02:00
|
|
|
test_expect_success 'Try a commit on rmdir' '
|
2006-06-20 02:59:35 +02:00
|
|
|
git rm -f deeply/nested/directory/number/2/another &&
|
2008-05-04 07:37:59 +02:00
|
|
|
git commit -a -m "remove another" &&
|
2006-12-16 08:58:08 +01:00
|
|
|
git-svn set-tree --rmdir HEAD &&
|
2008-05-04 07:37:59 +02:00
|
|
|
svn ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
|
|
|
|
'
|
2006-06-20 02:59:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
test_done
|