diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-20 17:20:45 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-20 17:20:45 -0800 |
commit | 5b85143ba548c6c0c35df5e606ee3568c55ca0da (patch) | |
tree | 9602d237fafa8193274134dd5a5d4070ad43c4ed /t | |
parent | ce0545455a09113a8ece8f80c87ec61110569940 (diff) | |
parent | 3289e86e1eb4f38b5c8dfd2f44b4486d2755d6d6 (diff) | |
download | git-5b85143ba548c6c0c35df5e606ee3568c55ca0da.tar.gz |
Merge branch 'ew/svn-pm'
* ew/svn-pm:
git-svn: rename 'commit' command to 'set-tree'
git-svn: remove support for the svn command-line client
git-svn: convert to using Git.pm
Diffstat (limited to 't')
-rw-r--r-- | t/Makefile | 10 | ||||
-rw-r--r-- | t/lib-git-svn.sh | 15 | ||||
-rwxr-xr-x | t/t9100-git-svn-basic.sh | 26 | ||||
-rwxr-xr-x | t/t9101-git-svn-props.sh | 2 | ||||
-rwxr-xr-x | t/t9102-git-svn-deep-rmdir.sh | 2 | ||||
-rwxr-xr-x | t/t9104-git-svn-follow-parent.sh | 7 | ||||
-rwxr-xr-x | t/t9105-git-svn-commit-diff.sh | 7 | ||||
-rwxr-xr-x | t/t9106-git-svn-commit-diff-clobber.sh | 7 |
8 files changed, 25 insertions, 51 deletions
diff --git a/t/Makefile b/t/Makefile index c9bd9a4690..250a19019c 100644 --- a/t/Makefile +++ b/t/Makefile @@ -23,13 +23,9 @@ clean: # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL full-svn-test: - $(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_DELTA_FETCH=1 \ - GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C - $(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C - $(MAKE) $(TSVN) GIT_SVN_NO_LIB=1 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \ - LC_ALL=en_US.UTF-8 - $(MAKE) $(TSVN) GIT_SVN_NO_LIB=0 GIT_SVN_NO_OPTIMIZE_COMMITS=0 \ - LC_ALL=en_US.UTF-8 + $(MAKE) $(TSVN) GIT_SVN_DELTA_FETCH=1 \ + GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C + $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8 .PHONY: $(T) clean .NOTPARALLEL: diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index 63c670304f..99ada71349 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -7,17 +7,18 @@ then exit fi -GIT_DIR=$PWD/.git -GIT_SVN_DIR=$GIT_DIR/svn/git-svn -SVN_TREE=$GIT_SVN_DIR/svn-tree - -perl -e 'use SVN::Core' >/dev/null 2>&1 +perl -e 'use SVN::Core; $SVN::Core::VERSION gt "1.1.0" or die' >/dev/null 2>&1 if test $? -ne 0 then - echo 'Perl SVN libraries not found, tests requiring those will be skipped' - GIT_SVN_NO_LIB=1 + test_expect_success 'Perl SVN libraries not found, skipping test' : + test_done + exit fi +GIT_DIR=$PWD/.git +GIT_SVN_DIR=$GIT_DIR/svn/git-svn +SVN_TREE=$GIT_SVN_DIR/svn-tree + svnadmin >/dev/null 2>&1 if test $? -ne 1 then diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh index f9de232366..0edf19e48d 100755 --- a/t/t9100-git-svn-basic.sh +++ b/t/t9100-git-svn-basic.sh @@ -56,7 +56,7 @@ git update-index --add --remove dir/a/b/c/d/e/file dir/file file git commit -m "$name" test_expect_success "$name" \ - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch && + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch && svn up $SVN_TREE && test -d $SVN_TREE/dir && test ! -d $SVN_TREE/dir/a" @@ -70,7 +70,7 @@ git update-index --add dir/file/file git commit -m "$name" test_expect_failure "$name" \ - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch' \ + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch' \ || true @@ -85,7 +85,7 @@ git update-index --add -- bar git commit -m "$name" test_expect_failure "$name" \ - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch2' \ + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch2' \ || true @@ -100,7 +100,7 @@ git-update-index --add bar/zzz/yyy git commit -m "$name" test_expect_failure "$name" \ - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch3' \ + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch3' \ || true @@ -115,7 +115,7 @@ git update-index --add -- dir git commit -m "$name" test_expect_failure "$name" \ - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch4' \ + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch4' \ || true @@ -127,7 +127,7 @@ git update-index exec.sh git commit -m "$name" test_expect_success "$name" \ - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 && + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 && svn up $SVN_TREE && test ! -x $SVN_TREE/exec.sh" @@ -138,7 +138,7 @@ git update-index exec.sh git commit -m "$name" test_expect_success "$name" \ - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 && + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 && svn up $SVN_TREE && test -x $SVN_TREE/exec.sh" @@ -153,7 +153,7 @@ then git commit -m "$name" test_expect_success "$name" \ - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 && + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 && svn up $SVN_TREE && test -L $SVN_TREE/exec.sh" @@ -164,7 +164,7 @@ then git commit -m "$name" test_expect_success "$name" \ - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 && + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 && svn up $SVN_TREE && test -x $SVN_TREE/bar/zzz && test -L $SVN_TREE/exec-2.sh" @@ -177,7 +177,7 @@ then git commit -m "$name" test_expect_success "$name" \ - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 && + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 && svn up $SVN_TREE && test -f $SVN_TREE/exec-2.sh && test ! -L $SVN_TREE/exec-2.sh && @@ -192,7 +192,7 @@ then git update-index exec-2.sh git commit -m 'éï∏' export LC_ALL="$GIT_SVN_LC_ALL" - test_expect_success "$name" "git-svn commit HEAD" + test_expect_success "$name" "git-svn set-tree HEAD" unset LC_ALL else echo "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)" @@ -229,9 +229,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4 EOF -if test -z "$GIT_SVN_NO_LIB" || test "$GIT_SVN_NO_LIB" -eq 0; then - echo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected -fi +echo tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 >> expected test_expect_success "$name" "diff -u a expected" diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh index a5a235f100..5543b07f16 100755 --- a/t/t9101-git-svn-props.sh +++ b/t/t9101-git-svn-props.sh @@ -74,7 +74,7 @@ test_expect_success "$name" \ 'git checkout -b mybranch remotes/git-svn && echo Hi again >> kw.c && git commit -a -m "test keywoards ignoring" && - git-svn commit remotes/git-svn..mybranch && + git-svn set-tree remotes/git-svn..mybranch && git pull . remotes/git-svn' expect='/* $Id$ */' diff --git a/t/t9102-git-svn-deep-rmdir.sh b/t/t9102-git-svn-deep-rmdir.sh index d693d183c8..572aaedc06 100755 --- a/t/t9102-git-svn-deep-rmdir.sh +++ b/t/t9102-git-svn-deep-rmdir.sh @@ -21,7 +21,7 @@ test_expect_success 'mirror via git-svn' " test_expect_success 'Try a commit on rmdir' " git rm -f deeply/nested/directory/number/2/another && git commit -a -m 'remove another' && - git-svn commit --rmdir HEAD && + git-svn set-tree --rmdir HEAD && svn ls -R $svnrepo | grep ^deeply/nested/directory/number/1 " diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh index 01488ff78a..8d2e2fec39 100755 --- a/t/t9104-git-svn-follow-parent.sh +++ b/t/t9104-git-svn-follow-parent.sh @@ -6,13 +6,6 @@ test_description='git-svn --follow-parent fetching' . ./lib-git-svn.sh -if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0 -then - echo 'Skipping: --follow-parent needs SVN libraries' - test_done - exit 0 -fi - test_expect_success 'initialize repo' " mkdir import && cd import && diff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh index 746c8277d0..6323c7e3ac 100755 --- a/t/t9105-git-svn-commit-diff.sh +++ b/t/t9105-git-svn-commit-diff.sh @@ -4,13 +4,6 @@ test_description='git-svn commit-diff' . ./lib-git-svn.sh -if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0 -then - echo 'Skipping: commit-diff needs SVN libraries' - test_done - exit 0 -fi - test_expect_success 'initialize repo' " mkdir import && cd import && diff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh index 58698b3f29..59b6425ce4 100755 --- a/t/t9106-git-svn-commit-diff-clobber.sh +++ b/t/t9106-git-svn-commit-diff-clobber.sh @@ -4,13 +4,6 @@ test_description='git-svn commit-diff clobber' . ./lib-git-svn.sh -if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0 -then - echo 'Skipping: commit-diff clobber needs SVN libraries' - test_done - exit 0 -fi - test_expect_success 'initialize repo' " mkdir import && cd import && |