diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t9107-git-svn-migrate.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh index 53318f1b1a..74a45ec647 100755 --- a/t/t9107-git-svn-migrate.sh +++ b/t/t9107-git-svn-migrate.sh @@ -46,6 +46,7 @@ test_expect_success 'initialize a multi-repository repo' " grep '^tags/0\.3:refs/remotes/tags/0\.3$' fetch.out " +# refs should all be different, but the trees should all be the same: test_expect_success 'multi-fetch works on partial urls + paths' " git-svn multi-fetch && for i in trunk a b tags/0.1 tags/0.2 tags/0.3; do @@ -59,5 +60,29 @@ test_expect_success 'multi-fetch works on partial urls + paths' " refs/remotes/\$j\`\" ||exit 1; done; done " +test_expect_success 'migrate --minimize on old multi-inited layout' " + git repo-config --unset-all svn-remote.git-svn.fetch && + git repo-config --unset-all svn-remote.git-svn.url && + rm -rf $GIT_DIR/svn && + for i in \`cat fetch.out\`; do + path=\`expr \$i : '\\([^:]*\\):.*$'\` + ref=\`expr \$i : '[^:]*:refs/remotes/\\(.*\\)$'\` + if test -z \"\$ref\"; then continue; fi + if test -n \"\$path\"; then path=\"/\$path\"; fi + ( mkdir -p $GIT_DIR/svn/\$ref/info/ && + echo $svnrepo\$path > $GIT_DIR/svn/\$ref/info/url ) || exit 1; + done && + git-svn migrate --minimize && + test -z \"\`git-repo-config -l |grep -v '^svn-remote\.git-svn\.'\`\" && + git-repo-config --get-all svn-remote.git-svn.fetch > fetch.out && + grep '^trunk:refs/remotes/trunk$' fetch.out && + grep '^branches/a:refs/remotes/a$' fetch.out && + grep '^branches/b:refs/remotes/b$' fetch.out && + grep '^tags/0\.1:refs/remotes/tags/0\.1$' fetch.out && + grep '^tags/0\.2:refs/remotes/tags/0\.2$' fetch.out && + grep '^tags/0\.3:refs/remotes/tags/0\.3$' fetch.out + grep '^:refs/remotes/git-svn' fetch.out + " + test_done |