summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Eric Wong <normalperson@yhbt.net>2007-01-21 04:27:09 -0800
committerLibravatar Eric Wong <normalperson@yhbt.net>2007-02-23 00:57:09 -0800
commit47e39c55c91993b94824b7a317ebeb965aaeb45a (patch)
treefe3f4dbbd031d47d6c006e6e9c9d43c138c9d3b1 /t
parentgit-svn: reuse open SVN::Ra connections by URL (diff)
downloadtgif-47e39c55c91993b94824b7a317ebeb965aaeb45a.tar.xz
git-svn: enable --minimize to simplify the config and connections
--minimize will update the git-svn configuration to attempt to connect to the repository root (instead of directly to the path(s) we are tracking) in order to allow more efficient reuse of connections (for multi-fetch and follow-parent). Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t9107-git-svn-migrate.sh25
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