Skip to content

Commit

Permalink
t/t91XX git-svn tests: run "git svn" not "git-svn"
Browse files Browse the repository at this point in the history
This replaces 'git-svn' with 'git svn' in the tests.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nanako Shiraishi authored and Junio C Hamano committed Sep 8, 2008
1 parent 16805d3 commit 1364ff2
Show file tree
Hide file tree
Showing 27 changed files with 174 additions and 174 deletions.
6 changes: 3 additions & 3 deletions t/lib-git-svn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ git_svn_id=git""-svn-id

if test -n "$NO_SVN_TESTS"
then
test_expect_success 'skipping git-svn tests, NO_SVN_TESTS defined' :
test_expect_success 'skipping git svn tests, NO_SVN_TESTS defined' :
test_done
exit
fi
Expand All @@ -17,7 +17,7 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree
svn >/dev/null 2>&1
if test $? -ne 1
then
test_expect_success 'skipping git-svn tests, svn not found' :
test_expect_success 'skipping git svn tests, svn not found' :
test_done
exit
fi
Expand Down Expand Up @@ -91,7 +91,7 @@ start_httpd () {
mkdir "$GIT_DIR"/logs

cat > "$GIT_DIR/httpd.conf" <<EOF
ServerName "git-svn test"
ServerName "git svn test"
ServerRoot "$GIT_DIR"
DocumentRoot "$GIT_DIR"
PidFile "$GIT_DIR/httpd.pid"
Expand Down
48 changes: 24 additions & 24 deletions t/t9100-git-svn-basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2006 Eric Wong
#

test_description='git-svn basic tests'
test_description='git svn basic tests'
GIT_SVN_LC_ALL=${LC_ALL:-$LANG}

case "$GIT_SVN_LC_ALL" in
Expand All @@ -17,7 +17,7 @@ esac

. ./lib-git-svn.sh

say 'define NO_SVN_TESTS to skip git-svn tests'
say 'define NO_SVN_TESTS to skip git svn tests'

test_expect_success \
'initialize git-svn' '
Expand All @@ -34,11 +34,11 @@ test_expect_success \
svn import -m "import for git-svn" . "$svnrepo" >/dev/null &&
cd .. &&
rm -rf import &&
git-svn init "$svnrepo"'
git svn init "$svnrepo"'

test_expect_success \
'import an SVN revision into git' \
'git-svn fetch'
'git svn fetch'

test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'

Expand All @@ -49,7 +49,7 @@ test_expect_success "$name" '
cp dir/file file &&
git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
git commit -m "$name" &&
git-svn set-tree --find-copies-harder --rmdir \
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'
Expand All @@ -63,7 +63,7 @@ test_expect_success "$name" "
git update-index --remove dir/file &&
git update-index --add dir/file/file &&
git commit -m '$name' &&
test_must_fail git-svn set-tree --find-copies-harder --rmdir \
test_must_fail git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch" || true


Expand All @@ -77,7 +77,7 @@ test_expect_success "$name" '
git update-index --remove -- bar/zzz &&
git update-index --add -- bar &&
git commit -m "$name" &&
test_must_fail git-svn set-tree --find-copies-harder --rmdir \
test_must_fail git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch2' || true


Expand All @@ -91,7 +91,7 @@ test_expect_success "$name" '
echo yyy > bar/zzz/yyy &&
git update-index --add bar/zzz/yyy &&
git commit -m "$name" &&
test_must_fail git-svn set-tree --find-copies-harder --rmdir \
test_must_fail git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch3' || true


Expand All @@ -105,7 +105,7 @@ test_expect_success "$name" '
echo asdf > dir &&
git update-index --add -- dir &&
git commit -m "$name" &&
test_must_fail git-svn set-tree --find-copies-harder --rmdir \
test_must_fail git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch4' || true


Expand All @@ -116,7 +116,7 @@ test_expect_success "$name" '
chmod -x exec.sh &&
git update-index exec.sh &&
git commit -m "$name" &&
git-svn set-tree --find-copies-harder --rmdir \
git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch5 &&
svn up "$SVN_TREE" &&
test ! -x "$SVN_TREE"/exec.sh'
Expand All @@ -127,7 +127,7 @@ test_expect_success "$name" '
chmod +x exec.sh &&
git update-index exec.sh &&
git commit -m "$name" &&
git-svn set-tree --find-copies-harder --rmdir \
git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch5 &&
svn up "$SVN_TREE" &&
test -x "$SVN_TREE"/exec.sh'
Expand All @@ -139,7 +139,7 @@ test_expect_success "$name" '
ln -s bar/zzz exec.sh &&
git update-index exec.sh &&
git commit -m "$name" &&
git-svn set-tree --find-copies-harder --rmdir \
git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch5 &&
svn up "$SVN_TREE" &&
test -L "$SVN_TREE"/exec.sh'
Expand All @@ -151,7 +151,7 @@ test_expect_success "$name" '
ln -s bar/zzz exec-2.sh &&
git update-index --add bar/zzz exec-2.sh &&
git commit -m "$name" &&
git-svn set-tree --find-copies-harder --rmdir \
git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch5 &&
svn up "$SVN_TREE" &&
test -x "$SVN_TREE"/bar/zzz &&
Expand All @@ -164,7 +164,7 @@ test_expect_success "$name" '
cp help exec-2.sh &&
git update-index exec-2.sh &&
git commit -m "$name" &&
git-svn set-tree --find-copies-harder --rmdir \
git svn set-tree --find-copies-harder --rmdir \
${remotes_git_svn}..mybranch5 &&
svn up "$SVN_TREE" &&
test -f "$SVN_TREE"/exec-2.sh &&
Expand All @@ -180,7 +180,7 @@ then
echo '# hello' >> exec-2.sh &&
git update-index exec-2.sh &&
git commit -m 'éï∏' &&
git-svn set-tree HEAD"
git svn set-tree HEAD"
unset LC_ALL
else
say "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
Expand All @@ -190,7 +190,7 @@ name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'
GIT_SVN_ID=alt
export GIT_SVN_ID
test_expect_success "$name" \
'git-svn init "$svnrepo" && git-svn fetch &&
'git svn init "$svnrepo" && git svn fetch &&
git rev-list --pretty=raw ${remotes_git_svn} | grep ^tree | uniq > a &&
git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
test_cmp a b'
Expand All @@ -216,52 +216,52 @@ test_expect_success "$name" "test_cmp a expected"
test_expect_success 'exit if remote refs are ambigious' "
git config --add svn-remote.svn.fetch \
bar:refs/${remotes_git_svn} &&
test_must_fail git-svn migrate
test_must_fail git svn migrate
"

test_expect_success 'exit if init-ing a would clobber a URL' '
svnadmin create "${PWD}/svnrepo2" &&
svn mkdir -m "mkdir bar" "${svnrepo}2/bar" &&
git config --unset svn-remote.svn.fetch \
"^bar:refs/${remotes_git_svn}$" &&
test_must_fail git-svn init "${svnrepo}2/bar"
test_must_fail git svn init "${svnrepo}2/bar"
'

test_expect_success \
'init allows us to connect to another directory in the same repo' '
git-svn init --minimize-url -i bar "$svnrepo/bar" &&
git svn init --minimize-url -i bar "$svnrepo/bar" &&
git config --get svn-remote.svn.fetch \
"^bar:refs/remotes/bar$" &&
git config --get svn-remote.svn.fetch \
"^:refs/${remotes_git_svn}$"
'

test_expect_success 'able to dcommit to a subdirectory' "
git-svn fetch -i bar &&
git svn fetch -i bar &&
git checkout -b my-bar refs/remotes/bar &&
echo abc > d &&
git update-index --add d &&
git commit -m '/bar/d should be in the log' &&
git-svn dcommit -i bar &&
git svn dcommit -i bar &&
test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\" &&
mkdir newdir &&
echo new > newdir/dir &&
git update-index --add newdir/dir &&
git commit -m 'add a new directory' &&
git-svn dcommit -i bar &&
git svn dcommit -i bar &&
test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\" &&
echo foo >> newdir/dir &&
git update-index newdir/dir &&
git commit -m 'modify a file in new directory' &&
git-svn dcommit -i bar &&
git svn dcommit -i bar &&
test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\"
"

test_expect_success 'able to set-tree to a subdirectory' "
echo cba > d &&
git update-index d &&
git commit -m 'update /bar/d' &&
git-svn set-tree -i bar HEAD &&
git svn set-tree -i bar HEAD &&
test -z \"\`git diff refs/heads/my-bar refs/remotes/bar\`\"
"

Expand Down
36 changes: 18 additions & 18 deletions t/t9101-git-svn-props.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2006 Eric Wong
#

test_description='git-svn property tests'
test_description='git svn property tests'
. ./lib-git-svn.sh

mkdir import
Expand Down Expand Up @@ -66,15 +66,15 @@ test_expect_success 'setup some commits to svn' \
svn commit -m "Propset Id" &&
cd ..'

test_expect_success 'initialize git-svn' 'git-svn init "$svnrepo"'
test_expect_success 'fetch revisions from svn' 'git-svn fetch'
test_expect_success 'initialize git-svn' 'git svn init "$svnrepo"'
test_expect_success 'fetch revisions from svn' 'git svn fetch'

name='test svn:keywords ignoring'
test_expect_success "$name" \
'git checkout -b mybranch ${remotes_git_svn} &&
echo Hi again >> kw.c &&
git commit -a -m "test keywords ignoring" &&
git-svn set-tree ${remotes_git_svn}..mybranch &&
git svn set-tree ${remotes_git_svn}..mybranch &&
git pull . ${remotes_git_svn}'

expect='/* $Id$ */'
Expand All @@ -90,7 +90,7 @@ test_expect_success "propset CR on crlf files" \
cd ..'

test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
'git-svn fetch &&
'git svn fetch &&
git pull . ${remotes_git_svn} &&
svn co "$svnrepo" new_wc'

Expand All @@ -113,7 +113,7 @@ cd test_wc
svn commit -m "propset CRLF on cr files"'
cd ..
test_expect_success 'fetch and pull latest from svn' \
'git-svn fetch && git pull . ${remotes_git_svn}'
'git svn fetch && git pull . ${remotes_git_svn}'

b_cr="`git-hash-object cr`"
b_ne_cr="`git-hash-object ne_cr`"
Expand Down Expand Up @@ -145,7 +145,7 @@ test_expect_success 'test show-ignore' "
svn propset -R svn:ignore 'no-such-file*' .
svn commit -m 'propset svn:ignore'
cd .. &&
git-svn show-ignore > show-ignore.got &&
git svn show-ignore > show-ignore.got &&
cmp show-ignore.expect show-ignore.got
"

Expand All @@ -161,8 +161,8 @@ cat >create-ignore-index.expect <<\EOF
EOF

test_expect_success 'test create-ignore' "
git-svn fetch && git pull . ${remotes_git_svn} &&
git-svn create-ignore &&
git svn fetch && git pull . ${remotes_git_svn} &&
git svn create-ignore &&
cmp ./.gitignore create-ignore.expect &&
cmp ./deeply/.gitignore create-ignore.expect &&
cmp ./deeply/nested/.gitignore create-ignore.expect &&
Expand All @@ -182,15 +182,15 @@ EOF
# pattern, it can pass even though the propget did not execute on the
# right directory.
test_expect_success 'test propget' "
git-svn propget svn:ignore . | cmp - prop.expect &&
git svn propget svn:ignore . | cmp - prop.expect &&
cd deeply &&
git-svn propget svn:ignore . | cmp - ../prop.expect &&
git-svn propget svn:entry:committed-rev nested/directory/.keep \
git svn propget svn:ignore . | cmp - ../prop.expect &&
git svn propget svn:entry:committed-rev nested/directory/.keep \
| cmp - ../prop2.expect &&
git-svn propget svn:ignore .. | cmp - ../prop.expect &&
git-svn propget svn:ignore nested/ | cmp - ../prop.expect &&
git-svn propget svn:ignore ./nested | cmp - ../prop.expect &&
git-svn propget svn:ignore .././deeply/nested | cmp - ../prop.expect
git svn propget svn:ignore .. | cmp - ../prop.expect &&
git svn propget svn:ignore nested/ | cmp - ../prop.expect &&
git svn propget svn:ignore ./nested | cmp - ../prop.expect &&
git svn propget svn:ignore .././deeply/nested | cmp - ../prop.expect
"

cat >prop.expect <<\EOF
Expand All @@ -210,8 +210,8 @@ Properties on 'nested/directory/.keep':
EOF

test_expect_success 'test proplist' "
git-svn proplist . | cmp - prop.expect &&
git-svn proplist nested/directory/.keep | cmp - prop2.expect
git svn proplist . | cmp - prop.expect &&
git svn proplist nested/directory/.keep | cmp - prop2.expect
"

test_done
8 changes: 4 additions & 4 deletions t/t9102-git-svn-deep-rmdir.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
test_description='git-svn rmdir'
test_description='git svn rmdir'
. ./lib-git-svn.sh

test_expect_success 'initialize repo' '
Expand All @@ -14,15 +14,15 @@ test_expect_success 'initialize repo' '
'

test_expect_success 'mirror via git-svn' '
git-svn init "$svnrepo" &&
git-svn fetch &&
git svn init "$svnrepo" &&
git svn fetch &&
git checkout -f -b test-rmdir ${remotes_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 set-tree --rmdir HEAD &&
git svn set-tree --rmdir HEAD &&
svn ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
'

Expand Down
2 changes: 1 addition & 1 deletion t/t9103-git-svn-tracked-directory-removed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2007 Eric Wong
#

test_description='git-svn tracking removed top-level path'
test_description='git svn tracking removed top-level path'
. ./lib-git-svn.sh

test_expect_success 'make history for tracking' '
Expand Down
Loading

0 comments on commit 1364ff2

Please sign in to comment.