{"thread":{"id":"6179","subject":"[PATCH] git-svn: remove svnadmin dependency from the tests","startedAt":"2007-01-01T05:49:45Z","lastAt":"2007-01-01T05:49:47Z","messageCount":3,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30607","messageId":"1167630587505-git-send-email-normalperson@yhbt.net","threadId":"6179","inReplyTo":null,"subject":"[PATCH] git-svn: remove svnadmin dependency from the tests","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-01-01T05:49:45Z","receivedAt":"2007-01-01T05:49:45Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We require the libraries now, so we can create repositories\nusing them (and save some executable load time while we're at\nit).\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/lib-git-svn.sh |   39 +++++++++++++++++----------------------\n 1 files changed, 17 insertions(+), 22 deletions(-)\n\ndiff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh\nindex 99ada71..af42ccc 100644\n--- a/t/lib-git-svn.sh\n+++ b/t/lib-git-svn.sh\n@@ -7,26 +7,10 @@ then\n \texit\n fi\n \n-perl -e 'use SVN::Core; $SVN::Core::VERSION gt \"1.1.0\" or die' >/dev/null 2>&1\n-if test $? -ne 0\n-then\n-\ttest_expect_success 'Perl SVN libraries not found, skipping test' :\n-\ttest_done\n-\texit\n-fi\n-\n GIT_DIR=$PWD/.git\n GIT_SVN_DIR=$GIT_DIR/svn/git-svn\n SVN_TREE=$GIT_SVN_DIR/svn-tree\n \n-svnadmin >/dev/null 2>&1\n-if test $? -ne 1\n-then\n-    test_expect_success 'skipping git-svn tests, svnadmin not found' :\n-    test_done\n-    exit\n-fi\n-\n svn >/dev/null 2>&1\n if test $? -ne 1\n then\n@@ -37,13 +21,24 @@ fi\n \n svnrepo=$PWD/svnrepo\n \n-set -e\n-\n-if svnadmin create --help | grep fs-type >/dev/null\n+perl -w -e \"\n+use SVN::Core;\n+use SVN::Repos;\n+\\$SVN::Core::VERSION gt '1.1.0' or exit(42);\n+SVN::Repos::create('$svnrepo', undef, undef, undef,\n+                           { 'fs-config' => 'fsfs'});\n+\"\n+x=$?\n+if test $x -ne 0\n then\n-\tsvnadmin create --fs-type fsfs \"$svnrepo\"\n-else\n-\tsvnadmin create \"$svnrepo\"\n+\tif test $x -eq 42; then\n+\t\terr='Perl SVN libraries must be >= 1.1.0'\n+\telse\n+\t\terr='Perl SVN libraries not found or unusable, skipping test'\n+\tfi\n+\ttest_expect_success \"$err\" :\n+\ttest_done\n+\texit\n fi\n \n svnrepo=\"file://$svnrepo\"\n-- \n1.5.0.rc0.g1ed48\n"},{"id":"30608","messageId":"1167630588899-git-send-email-normalperson@yhbt.net","threadId":"6179","inReplyTo":"1167630587505-git-send-email-normalperson@yhbt.net","subject":"[PATCH] git-svn: t/t9100-git-svn-basic: remove old check for NO_SYMLINK","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-01-01T05:49:46Z","receivedAt":"2007-01-01T05:49:46Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We don't support the svn command-line client anymore; nor\ndo we support anything before SVN 1.1.0, so we can be certain\nsymlinks will be supported in the SVN repository.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/t9100-git-svn-basic.sh |   84 +++++++++++++++++++---------------------------\n 1 files changed, 35 insertions(+), 49 deletions(-)\n\ndiff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh\nindex c22fe47..040da92 100755\n--- a/t/t9100-git-svn-basic.sh\n+++ b/t/t9100-git-svn-basic.sh\n@@ -24,10 +24,7 @@ test_expect_success \\\n \tmkdir import &&\n \tcd import &&\n \techo foo > foo &&\n-\tif test -z '$NO_SYMLINK'\n-\tthen\n-\t\tln -s foo foo.link\n-\tfi\n+\tln -s foo foo.link\n \tmkdir -p dir/a/b/c/d/e &&\n \techo 'deep dir' > dir/a/b/c/d/e/file &&\n \tmkdir bar &&\n@@ -136,48 +133,43 @@ test_expect_success \"$name\" \"\n \ttest -x '$SVN_TREE'/exec.sh\"\n \n \n-if test -z \"$NO_SYMLINK\"\n-then\n-\tname='executable file becomes a symlink to bar/zzz (file)'\n-\n-\ttest_expect_success \"$name\" \"\n-\t\trm exec.sh &&\n-\t\tln -s bar/zzz exec.sh &&\n-\t\tgit update-index exec.sh &&\n-\t\tgit commit -m '$name' &&\n-\t\tgit-svn set-tree --find-copies-harder --rmdir \\\n-\t\t\tremotes/git-svn..mybranch5 &&\n-\t\tsvn up '$SVN_TREE' &&\n-\t\ttest -L '$SVN_TREE'/exec.sh\"\n+name='executable file becomes a symlink to bar/zzz (file)'\n+test_expect_success \"$name\" \"\n+\trm exec.sh &&\n+\tln -s bar/zzz exec.sh &&\n+\tgit update-index exec.sh &&\n+\tgit commit -m '$name' &&\n+\tgit-svn set-tree --find-copies-harder --rmdir \\\n+\t\tremotes/git-svn..mybranch5 &&\n+\tsvn up '$SVN_TREE' &&\n+\ttest -L '$SVN_TREE'/exec.sh\"\n \n-\tname='new symlink is added to a file that was also just made executable'\n+name='new symlink is added to a file that was also just made executable'\n \n-\ttest_expect_success \"$name\" \"\n-\t\tchmod +x bar/zzz &&\n-\t\tln -s bar/zzz exec-2.sh &&\n-\t\tgit update-index --add bar/zzz exec-2.sh &&\n-\t\tgit commit -m '$name' &&\n-\t\tgit-svn set-tree --find-copies-harder --rmdir \\\n-\t\t\tremotes/git-svn..mybranch5 &&\n-\t\tsvn up '$SVN_TREE' &&\n-\t\ttest -x '$SVN_TREE'/bar/zzz &&\n-\t\ttest -L '$SVN_TREE'/exec-2.sh\"\n-\n-\tname='modify a symlink to become a file'\n-\ttest_expect_success \"$name\" \"\n-\t\techo git help > help || true &&\n-\t\trm exec-2.sh &&\n-\t\tcp help exec-2.sh &&\n-\t\tgit update-index exec-2.sh &&\n-\t\tgit commit -m '$name' &&\n-\t\tgit-svn set-tree --find-copies-harder --rmdir \\\n-\t\t\tremotes/git-svn..mybranch5 &&\n-\t\tsvn up '$SVN_TREE' &&\n-\t\ttest -f '$SVN_TREE'/exec-2.sh &&\n-\t\ttest ! -L '$SVN_TREE'/exec-2.sh &&\n-\t\tdiff -u help $SVN_TREE/exec-2.sh\"\n-fi\n+test_expect_success \"$name\" \"\n+\tchmod +x bar/zzz &&\n+\tln -s bar/zzz exec-2.sh &&\n+\tgit update-index --add bar/zzz exec-2.sh &&\n+\tgit commit -m '$name' &&\n+\tgit-svn set-tree --find-copies-harder --rmdir \\\n+\t\tremotes/git-svn..mybranch5 &&\n+\tsvn up '$SVN_TREE' &&\n+\ttest -x '$SVN_TREE'/bar/zzz &&\n+\ttest -L '$SVN_TREE'/exec-2.sh\"\n \n+name='modify a symlink to become a file'\n+test_expect_success \"$name\" \"\n+\techo git help > help || true &&\n+\trm exec-2.sh &&\n+\tcp help exec-2.sh &&\n+\tgit update-index exec-2.sh &&\n+\tgit commit -m '$name' &&\n+\tgit-svn set-tree --find-copies-harder --rmdir \\\n+\t\tremotes/git-svn..mybranch5 &&\n+\tsvn up '$SVN_TREE' &&\n+\ttest -f '$SVN_TREE'/exec-2.sh &&\n+\ttest ! -L '$SVN_TREE'/exec-2.sh &&\n+\tdiff -u help $SVN_TREE/exec-2.sh\"\n \n if test \"$have_utf8\" = t\n then\n@@ -203,12 +195,6 @@ test_expect_success \"$name\" \\\n      git-rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&\n      diff -u a b\"\n \n-if test -n \"$NO_SYMLINK\"\n-then\n-\ttest_done\n-\texit 0\n-fi\n-\n name='check imported tree checksums expected tree checksums'\n rm -f expected\n if test \"$have_utf8\" = t\n-- \n1.5.0.rc0.g1ed48\n"},{"id":"30609","messageId":"11676305901855-git-send-email-normalperson@yhbt.net","threadId":"6179","inReplyTo":"1167630588899-git-send-email-normalperson@yhbt.net","subject":"[PATCH] git-svn: t/t91??-*: optimize the tests a bit","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-01-01T05:49:47Z","receivedAt":"2007-01-01T05:49:47Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"This removes some unnecessary 'svn up' calls throughout\n\nt9103-git-svn-graft-branches.sh:\n  * removed an 'svn log' call that was leftover from debugging\n  * removed multiple git-svn calls with a multi-init / multi-fetch\n    combination (which weren't tested before, either)\n  * replaced `rev-list ... | head -n1` with `rev-parse ...`\n    (not sure what I was thinking when I wrote that)\n\nAll this saves about 9 seconds from a test run\n(53s -> 44s for 'make t91*') on my 1.3GHz Athlon\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n t/t9101-git-svn-props.sh          |   11 +++--------\n t/t9103-git-svn-graft-branches.sh |   14 ++++----------\n t/t9104-git-svn-follow-parent.sh  |    1 -\n 3 files changed, 7 insertions(+), 19 deletions(-)\n\ndiff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh\nindex 5543b07..46fcec5 100755\n--- a/t/t9101-git-svn-props.sh\n+++ b/t/t9101-git-svn-props.sh\n@@ -57,13 +57,10 @@ test_expect_success 'setup some commits to svn' \\\n \t'cd test_wc &&\n \t\techo Greetings >> kw.c &&\n \t\tsvn commit -m \"Not yet an Id\" &&\n-\t\tsvn up &&\n \t\techo Hello world >> kw.c &&\n \t\tsvn commit -m \"Modified file, but still not yet an Id\" &&\n-\t\tsvn up &&\n \t\tsvn propset svn:keywords Id kw.c &&\n-\t\tsvn commit -m \"Propset Id\" &&\n-\t\tsvn up &&\n+\t\tsvn commit -m \"Propset Id\"\n \tcd ..'\n \n test_expect_success 'initialize git-svn' \"git-svn init $svnrepo\"\n@@ -86,8 +83,7 @@ test_expect_success \"propset CR on crlf files\" \\\n \t\tsvn propset svn:eol-style CR empty &&\n \t\tsvn propset svn:eol-style CR crlf &&\n \t\tsvn propset svn:eol-style CR ne_crlf &&\n-\t\tsvn commit -m \"propset CR on crlf files\" &&\n-\t\tsvn up &&\n+\t\tsvn commit -m \"propset CR on crlf files\"\n \t cd ..'\n \n test_expect_success 'fetch and pull latest from svn and checkout a new wc' \\\n@@ -111,8 +107,7 @@ cd test_wc\n \t svn propset svn:eol-style CRLF ne_cr &&\n \t svn propset svn:keywords Id cr &&\n \t svn propset svn:keywords Id ne_cr &&\n-\t svn commit -m \"propset CRLF on cr files\" &&\n-\t svn up'\n+\t svn commit -m \"propset CRLF on cr files\"'\n cd ..\n test_expect_success 'fetch and pull latest from svn' \\\n \t'git-svn fetch && git pull . remotes/git-svn'\ndiff --git a/t/t9103-git-svn-graft-branches.sh b/t/t9103-git-svn-graft-branches.sh\nindex 293b98f..b5f7677 100755\n--- a/t/t9103-git-svn-graft-branches.sh\n+++ b/t/t9103-git-svn-graft-branches.sh\n@@ -16,25 +16,19 @@ test_expect_success 'initialize repo' \"\n \tcd wc &&\n \techo feedme >> branches/a/readme &&\n \tsvn commit -m hungry &&\n-\tsvn up &&\n \tcd trunk &&\n \tsvn merge -r3:4 $svnrepo/branches/a &&\n \tsvn commit -m 'merge with a' &&\n \tcd ../.. &&\n-\tsvn log -v $svnrepo &&\n-\tgit-svn init -i trunk $svnrepo/trunk &&\n-\tgit-svn init -i a $svnrepo/branches/a &&\n-\tgit-svn init -i tags/a $svnrepo/tags/a &&\n-\tgit-svn fetch -i tags/a &&\n-\tgit-svn fetch -i a &&\n-\tgit-svn fetch -i trunk\n+\tgit-svn multi-init $svnrepo -T trunk -b branches -t tags &&\n+\tgit-svn multi-fetch\n \t\"\n \n r1=`git-rev-list remotes/trunk | tail -n1`\n r2=`git-rev-list remotes/tags/a | tail -n1`\n r3=`git-rev-list remotes/a | tail -n1`\n-r4=`git-rev-list remotes/a | head -n1`\n-r5=`git-rev-list remotes/trunk | head -n1`\n+r4=`git-rev-parse remotes/a`\n+r5=`git-rev-parse remotes/trunk`\n \n test_expect_success 'test graft-branches regexes and copies' \"\n \ttest -n \"$r1\" &&\ndiff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh\nindex 8d2e2fe..400c21c 100755\n--- a/t/t9104-git-svn-follow-parent.sh\n+++ b/t/t9104-git-svn-follow-parent.sh\n@@ -17,7 +17,6 @@ test_expect_success 'initialize repo' \"\n \tcd wc &&\n \techo world >> trunk/readme &&\n \tsvn commit -m 'another commit' &&\n-\tsvn up &&\n \tsvn mv -m 'rename to thunk' trunk thunk &&\n \tsvn up &&\n \techo goodbye >> thunk/readme &&\n-- \n1.5.0.rc0.g1ed48\n"}]}