send-email: simplify Gmail example in the documentation
[gitweb.git] / t / t9100-git-svn-basic.sh
index 22d8367ff397fc68683ff1084ce4914cfbfa9d89..28082b134fd54aafa38a4ac2964fd4c367e19fa2 100755 (executable)
@@ -45,13 +45,13 @@ test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'
 
 name='try a deep --rmdir with a commit'
 test_expect_success "$name" '
-       git checkout -f -b mybranch ${remotes_git_svn} &&
+       git checkout -f -b mybranch remotes/git-svn &&
        mv dir/a/b/c/d/e/file dir/file &&
        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 \
-               ${remotes_git_svn}..mybranch &&
+               remotes/git-svn..mybranch &&
        svn_cmd up "$SVN_TREE" &&
        test -d "$SVN_TREE"/dir && test ! -d "$SVN_TREE"/dir/a'
 
@@ -65,14 +65,14 @@ test_expect_success "$name" "
        git update-index --add dir/file/file &&
        git commit -m '$name' &&
        test_must_fail git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch
+               remotes/git-svn..mybranch
 "
 
 
 name='detect node change from directory to file #1'
 test_expect_success "$name" '
        rm -rf dir "$GIT_DIR"/index &&
-       git checkout -f -b mybranch2 ${remotes_git_svn} &&
+       git checkout -f -b mybranch2 remotes/git-svn &&
        mv bar/zzz zzz &&
        rm -rf bar &&
        mv zzz bar &&
@@ -80,14 +80,14 @@ test_expect_success "$name" '
        git update-index --add -- bar &&
        git commit -m "$name" &&
        test_must_fail git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch2
+               remotes/git-svn..mybranch2
 '
 
 
 name='detect node change from file to directory #2'
 test_expect_success "$name" '
        rm -f "$GIT_DIR"/index &&
-       git checkout -f -b mybranch3 ${remotes_git_svn} &&
+       git checkout -f -b mybranch3 remotes/git-svn &&
        rm bar/zzz &&
        git update-index --remove bar/zzz &&
        mkdir bar/zzz &&
@@ -95,7 +95,7 @@ test_expect_success "$name" '
        git update-index --add bar/zzz/yyy &&
        git commit -m "$name" &&
        git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch3 &&
+               remotes/git-svn..mybranch3 &&
        svn_cmd up "$SVN_TREE" &&
        test -d "$SVN_TREE"/bar/zzz &&
        test -e "$SVN_TREE"/bar/zzz/yyy
@@ -104,7 +104,7 @@ test_expect_success "$name" '
 name='detect node change from directory to file #2'
 test_expect_success "$name" '
        rm -f "$GIT_DIR"/index &&
-       git checkout -f -b mybranch4 ${remotes_git_svn} &&
+       git checkout -f -b mybranch4 remotes/git-svn &&
        rm -rf dir &&
        git update-index --remove -- dir/file &&
        touch dir &&
@@ -112,19 +112,19 @@ test_expect_success "$name" '
        git update-index --add -- dir &&
        git commit -m "$name" &&
        test_must_fail git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch4
+               remotes/git-svn..mybranch4
 '
 
 
 name='remove executable bit from a file'
 test_expect_success POSIXPERM "$name" '
        rm -f "$GIT_DIR"/index &&
-       git checkout -f -b mybranch5 ${remotes_git_svn} &&
+       git checkout -f -b mybranch5 remotes/git-svn &&
        chmod -x exec.sh &&
        git update-index exec.sh &&
        git commit -m "$name" &&
        git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch5 &&
+               remotes/git-svn..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test ! -x "$SVN_TREE"/exec.sh'
 
@@ -135,7 +135,7 @@ test_expect_success POSIXPERM "$name" '
        git update-index exec.sh &&
        git commit -m "$name" &&
        git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch5 &&
+               remotes/git-svn..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test -x "$SVN_TREE"/exec.sh'
 
@@ -147,7 +147,7 @@ test_expect_success SYMLINKS "$name" '
        git update-index exec.sh &&
        git commit -m "$name" &&
        git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch5 &&
+               remotes/git-svn..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test -h "$SVN_TREE"/exec.sh'
 
@@ -159,7 +159,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" '
        git update-index --add file exec-2.sh &&
        git commit -m "$name" &&
        git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch5 &&
+               remotes/git-svn..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test -x "$SVN_TREE"/file &&
        test -h "$SVN_TREE"/exec-2.sh'
@@ -172,7 +172,7 @@ test_expect_success POSIXPERM,SYMLINKS "$name" '
        git update-index exec-2.sh &&
        git commit -m "$name" &&
        git svn set-tree --find-copies-harder --rmdir \
-               ${remotes_git_svn}..mybranch5 &&
+               remotes/git-svn..mybranch5 &&
        svn_cmd up "$SVN_TREE" &&
        test -f "$SVN_TREE"/exec-2.sh &&
        test ! -h "$SVN_TREE"/exec-2.sh &&
@@ -194,7 +194,7 @@ GIT_SVN_ID=alt
 export GIT_SVN_ID
 test_expect_success "$name" \
     '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/git-svn | grep ^tree | uniq > a &&
      git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
      test_cmp a b'
 
@@ -217,17 +217,17 @@ EOF
 
 test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
 
-test_expect_success 'exit if remote refs are ambigious' "
+test_expect_success 'exit if remote refs are ambigious' '
         git config --add svn-remote.svn.fetch \
-                              bar:refs/${remotes_git_svn} &&
+               bar:refs/remotes/git-svn &&
        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}$" &&
+               "^bar:refs/remotes/git-svn$" &&
        test_must_fail git svn init "${svnrepo}2/bar"
         '
 
@@ -237,7 +237,7 @@ test_expect_success \
         git config --get svn-remote.svn.fetch \
                               "^bar:refs/remotes/bar$" &&
         git config --get svn-remote.svn.fetch \
-                              "^:refs/${remotes_git_svn}$"
+                             "^:refs/remotes/git-svn$"
         '
 
 test_expect_success 'dcommit $rev does not clobber current branch' '
@@ -259,26 +259,26 @@ test_expect_success 'dcommit $rev does not clobber current branch' '
        git branch -D my-bar
        '
 
-test_expect_success 'able to dcommit to a subdirectory' "
+test_expect_success 'able to dcommit to a subdirectory' '
        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 commit -m "/bar/d should be in the log" &&
        git svn dcommit -i bar &&
-       test -z \"\$(git diff refs/heads/my-bar refs/remotes/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 commit -m "add a new directory" &&
        git svn dcommit -i bar &&
-       test -z \"\$(git diff refs/heads/my-bar refs/remotes/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 commit -m "modify a file in new directory" &&
        git svn dcommit -i bar &&
-       test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\"
-       "
+       test -z "$(git diff refs/heads/my-bar refs/remotes/bar)"
+'
 
 test_expect_success 'dcommit should not fail with a touched file' '
        test_commit "commit-new-file-foo2" foo2 &&
@@ -291,13 +291,13 @@ test_expect_success 'rebase should not fail with a touched file' '
        git svn rebase
 '
 
-test_expect_success 'able to set-tree to a subdirectory' "
+test_expect_success 'able to set-tree to a subdirectory' '
        echo cba > d &&
        git update-index d &&
-       git commit -m 'update /bar/d' &&
+       git commit -m "update /bar/d" &&
        git svn set-tree -i bar HEAD &&
-       test -z \"\$(git diff refs/heads/my-bar refs/remotes/bar)\"
-       "
+       test -z "$(git diff refs/heads/my-bar refs/remotes/bar)"
+'
 
 test_expect_success 'git-svn works in a bare repository' '
        mkdir bare-repo &&