2007-01-16 09:31:49 +08:00
|
|
|
#!/bin/sh
|
2008-09-08 18:02:08 +08:00
|
|
|
test_description='git svn rmdir'
|
2006-06-20 08:59:35 +08:00
|
|
|
. ./lib-git-svn.sh
|
|
|
|
|
2008-05-04 13:37:59 +08:00
|
|
|
test_expect_success 'initialize repo' '
|
2006-06-20 08:59:35 +08:00
|
|
|
mkdir import &&
|
2010-09-07 09:42:54 +08:00
|
|
|
(
|
|
|
|
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 &&
|
|
|
|
svn_cmd import -m "import for git svn" . "$svnrepo"
|
2010-09-07 02:39:54 +08:00
|
|
|
)
|
2008-05-04 13:37:59 +08:00
|
|
|
'
|
2006-06-20 08:59:35 +08:00
|
|
|
|
2008-09-10 05:25:27 +08:00
|
|
|
test_expect_success 'mirror via git svn' '
|
2008-09-08 18:02:08 +08:00
|
|
|
git svn init "$svnrepo" &&
|
|
|
|
git svn fetch &&
|
2016-05-14 04:47:14 +08:00
|
|
|
git checkout -f -b test-rmdir remotes/git-svn
|
2008-05-04 13:37:59 +08:00
|
|
|
'
|
2006-06-20 08:59:35 +08:00
|
|
|
|
2008-05-04 13:37:59 +08:00
|
|
|
test_expect_success 'Try a commit on rmdir' '
|
2006-06-20 08:59:35 +08:00
|
|
|
git rm -f deeply/nested/directory/number/2/another &&
|
2008-05-04 13:37:59 +08:00
|
|
|
git commit -a -m "remove another" &&
|
2008-09-08 18:02:08 +08:00
|
|
|
git svn set-tree --rmdir HEAD &&
|
2009-05-08 16:06:16 +08:00
|
|
|
svn_cmd ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
|
2008-05-04 13:37:59 +08:00
|
|
|
'
|
2006-06-20 08:59:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
test_done
|