Several tests: cd inside subshell instead of around
Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
af24059fa2
commit
fd4ec4f2bb
@ -27,13 +27,13 @@ test_expect_success 'update-index and ls-files' '
|
|||||||
one) echo pass one ;;
|
one) echo pass one ;;
|
||||||
*) echo bad one; exit 1 ;;
|
*) echo bad one; exit 1 ;;
|
||||||
esac &&
|
esac &&
|
||||||
cd dir &&
|
(cd dir &&
|
||||||
git update-index --add two &&
|
git update-index --add two &&
|
||||||
case "`git ls-files`" in
|
case "`git ls-files`" in
|
||||||
two) echo pass two ;;
|
two) echo pass two ;;
|
||||||
*) echo bad two; exit 1 ;;
|
*) echo bad two; exit 1 ;;
|
||||||
esac &&
|
esac
|
||||||
cd .. &&
|
) &&
|
||||||
case "`git ls-files`" in
|
case "`git ls-files`" in
|
||||||
dir/two"$LF"one) echo pass both ;;
|
dir/two"$LF"one) echo pass both ;;
|
||||||
*) echo bad; exit 1 ;;
|
*) echo bad; exit 1 ;;
|
||||||
|
@ -32,9 +32,9 @@ test_expect_success 'gitdir selection on unsupported repo' '
|
|||||||
test "$(git config core.repositoryformatversion)" = 99)'
|
test "$(git config core.repositoryformatversion)" = 99)'
|
||||||
|
|
||||||
test_expect_success 'gitdir not required mode' '
|
test_expect_success 'gitdir not required mode' '
|
||||||
(git apply --stat test.patch &&
|
git apply --stat test.patch &&
|
||||||
cd test && git apply --stat ../test.patch &&
|
(cd test && git apply --stat ../test.patch) &&
|
||||||
cd ../test2 && git apply --stat ../test.patch)'
|
(cd test2 && git apply --stat ../test.patch)'
|
||||||
|
|
||||||
test_expect_success 'gitdir required mode on normal repos' '
|
test_expect_success 'gitdir required mode on normal repos' '
|
||||||
(git apply --check --index test.patch &&
|
(git apply --check --index test.patch &&
|
||||||
|
@ -63,10 +63,10 @@ cat > expected <<\EOF
|
|||||||
EOF
|
EOF
|
||||||
test_expect_success 'update-index --update from subdir' \
|
test_expect_success 'update-index --update from subdir' \
|
||||||
'echo not so happy >file2 &&
|
'echo not so happy >file2 &&
|
||||||
cd dir1 &&
|
(cd dir1 &&
|
||||||
cat ../file2 >file3 &&
|
cat ../file2 >file3 &&
|
||||||
git update-index --again &&
|
git update-index --again
|
||||||
cd .. &&
|
) &&
|
||||||
git ls-files -s >current &&
|
git ls-files -s >current &&
|
||||||
cmp current expected'
|
cmp current expected'
|
||||||
|
|
||||||
|
@ -55,15 +55,13 @@ test_expect_success setup '
|
|||||||
|
|
||||||
# We have to run from a sub-directory to trigger prune_path
|
# We have to run from a sub-directory to trigger prune_path
|
||||||
# Then we finally get to run our --with-tree test
|
# Then we finally get to run our --with-tree test
|
||||||
cd sub
|
|
||||||
|
|
||||||
test_expect_success 'git -ls-files --with-tree should succeed from subdir' '
|
test_expect_success 'git -ls-files --with-tree should succeed from subdir' '
|
||||||
|
|
||||||
git ls-files --with-tree=HEAD~1 >../output
|
(cd sub && git ls-files --with-tree=HEAD~1 >../output)
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
cd ..
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'git -ls-files --with-tree should add entries from named tree.' \
|
'git -ls-files --with-tree should add entries from named tree.' \
|
||||||
'test_cmp expected output'
|
'test_cmp expected output'
|
||||||
|
@ -42,23 +42,23 @@ test_expect_success 'setup for merge-preserving rebase' \
|
|||||||
git commit -a -m "Modify A2" &&
|
git commit -a -m "Modify A2" &&
|
||||||
|
|
||||||
git clone ./. clone1 &&
|
git clone ./. clone1 &&
|
||||||
cd clone1 &&
|
(cd clone1 &&
|
||||||
git checkout -b topic origin/topic &&
|
git checkout -b topic origin/topic &&
|
||||||
git merge origin/master &&
|
git merge origin/master
|
||||||
cd .. &&
|
) &&
|
||||||
|
|
||||||
echo Fifth > B &&
|
echo Fifth > B &&
|
||||||
git add B &&
|
git add B &&
|
||||||
git commit -m "Add different B" &&
|
git commit -m "Add different B" &&
|
||||||
|
|
||||||
git clone ./. clone2 &&
|
git clone ./. clone2 &&
|
||||||
cd clone2 &&
|
(cd clone2 &&
|
||||||
git checkout -b topic origin/topic &&
|
git checkout -b topic origin/topic &&
|
||||||
test_must_fail git merge origin/master &&
|
test_must_fail git merge origin/master &&
|
||||||
echo Resolved > B &&
|
echo Resolved > B &&
|
||||||
git add B &&
|
git add B &&
|
||||||
git commit -m "Merge origin/master into topic" &&
|
git commit -m "Merge origin/master into topic"
|
||||||
cd .. &&
|
) &&
|
||||||
|
|
||||||
git checkout topic &&
|
git checkout topic &&
|
||||||
echo Fourth >> B &&
|
echo Fourth >> B &&
|
||||||
|
@ -69,9 +69,9 @@ test_expect_success 'apply stashed changes (including index)' '
|
|||||||
test_expect_success 'unstashing in a subdirectory' '
|
test_expect_success 'unstashing in a subdirectory' '
|
||||||
git reset --hard HEAD &&
|
git reset --hard HEAD &&
|
||||||
mkdir subdir &&
|
mkdir subdir &&
|
||||||
cd subdir &&
|
(cd subdir &&
|
||||||
git stash apply &&
|
git stash apply
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'drop top stash' '
|
test_expect_success 'drop top stash' '
|
||||||
|
@ -85,10 +85,10 @@ EOF
|
|||||||
"
|
"
|
||||||
|
|
||||||
commit_file sm1 &&
|
commit_file sm1 &&
|
||||||
cd sm1 &&
|
head3=$(cd sm1 &&
|
||||||
git reset --hard HEAD~2 >/dev/null &&
|
git reset --hard HEAD~2 >/dev/null &&
|
||||||
head3=$(git rev-parse --verify HEAD | cut -c1-7) &&
|
git rev-parse --verify HEAD | cut -c1-7
|
||||||
cd ..
|
)
|
||||||
|
|
||||||
test_expect_success 'modified submodule(backward)' "
|
test_expect_success 'modified submodule(backward)' "
|
||||||
git diff-index -p --submodule=log HEAD >actual &&
|
git diff-index -p --submodule=log HEAD >actual &&
|
||||||
|
@ -21,18 +21,18 @@ test_expect_success setup '
|
|||||||
|
|
||||||
test_expect_success "clone and setup child repos" '
|
test_expect_success "clone and setup child repos" '
|
||||||
git clone . one &&
|
git clone . one &&
|
||||||
cd one &&
|
(cd one &&
|
||||||
echo >file updated by one &&
|
echo >file updated by one &&
|
||||||
git commit -a -m "updated by one" &&
|
git commit -a -m "updated by one"
|
||||||
cd .. &&
|
) &&
|
||||||
git clone . two &&
|
git clone . two &&
|
||||||
cd two &&
|
(cd two &&
|
||||||
git config branch.master.remote one &&
|
git config branch.master.remote one &&
|
||||||
git config remote.one.url ../one/.git/ &&
|
git config remote.one.url ../one/.git/ &&
|
||||||
git config remote.one.fetch refs/heads/master:refs/heads/one &&
|
git config remote.one.fetch refs/heads/master:refs/heads/one
|
||||||
cd .. &&
|
) &&
|
||||||
git clone . three &&
|
git clone . three &&
|
||||||
cd three &&
|
(cd three &&
|
||||||
git config branch.master.remote two &&
|
git config branch.master.remote two &&
|
||||||
git config branch.master.merge refs/heads/one &&
|
git config branch.master.merge refs/heads/one &&
|
||||||
mkdir -p .git/remotes &&
|
mkdir -p .git/remotes &&
|
||||||
@ -40,8 +40,8 @@ test_expect_success "clone and setup child repos" '
|
|||||||
echo "URL: ../two/.git/"
|
echo "URL: ../two/.git/"
|
||||||
echo "Pull: refs/heads/master:refs/heads/two"
|
echo "Pull: refs/heads/master:refs/heads/two"
|
||||||
echo "Pull: refs/heads/one:refs/heads/one"
|
echo "Pull: refs/heads/one:refs/heads/one"
|
||||||
} >.git/remotes/two &&
|
} >.git/remotes/two
|
||||||
cd .. &&
|
) &&
|
||||||
git clone . bundle &&
|
git clone . bundle &&
|
||||||
git clone . seven
|
git clone . seven
|
||||||
'
|
'
|
||||||
|
@ -104,7 +104,7 @@ test_expect_success '"git fsck" works' '
|
|||||||
test_expect_success 'repack, clone and fetch work' '
|
test_expect_success 'repack, clone and fetch work' '
|
||||||
git repack -a -d &&
|
git repack -a -d &&
|
||||||
git clone --no-hardlinks . clone_dir &&
|
git clone --no-hardlinks . clone_dir &&
|
||||||
cd clone_dir &&
|
(cd clone_dir &&
|
||||||
git show HEAD~5 | grep "A U Thor" &&
|
git show HEAD~5 | grep "A U Thor" &&
|
||||||
git show $HASH2 | grep "A U Thor" &&
|
git show $HASH2 | grep "A U Thor" &&
|
||||||
git cat-file commit $R &&
|
git cat-file commit $R &&
|
||||||
@ -113,8 +113,8 @@ test_expect_success 'repack, clone and fetch work' '
|
|||||||
git fetch ../ "refs/replace/*:refs/replace/*" &&
|
git fetch ../ "refs/replace/*:refs/replace/*" &&
|
||||||
git show HEAD~5 | grep "O Thor" &&
|
git show HEAD~5 | grep "O Thor" &&
|
||||||
git show $HASH2 | grep "O Thor" &&
|
git show $HASH2 | grep "O Thor" &&
|
||||||
git cat-file commit $R &&
|
git cat-file commit $R
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success '"git replace" listing and deleting' '
|
test_expect_success '"git replace" listing and deleting' '
|
||||||
@ -177,10 +177,10 @@ test_expect_success 'create parallel branch without the bug' '
|
|||||||
|
|
||||||
test_expect_success 'push to cloned repo' '
|
test_expect_success 'push to cloned repo' '
|
||||||
git push cloned $HASH6^:refs/heads/parallel &&
|
git push cloned $HASH6^:refs/heads/parallel &&
|
||||||
cd clone_dir &&
|
(cd clone_dir &&
|
||||||
git checkout parallel &&
|
git checkout parallel &&
|
||||||
git log --pretty=oneline | grep $PARA2 &&
|
git log --pretty=oneline | grep $PARA2
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'push branch with replacement' '
|
test_expect_success 'push branch with replacement' '
|
||||||
@ -191,20 +191,20 @@ test_expect_success 'push branch with replacement' '
|
|||||||
git show $HASH6~2 | grep "O Thor" &&
|
git show $HASH6~2 | grep "O Thor" &&
|
||||||
git show $PARA3 | grep "O Thor" &&
|
git show $PARA3 | grep "O Thor" &&
|
||||||
git push cloned $HASH6^:refs/heads/parallel2 &&
|
git push cloned $HASH6^:refs/heads/parallel2 &&
|
||||||
cd clone_dir &&
|
(cd clone_dir &&
|
||||||
git checkout parallel2 &&
|
git checkout parallel2 &&
|
||||||
git log --pretty=oneline | grep $PARA3 &&
|
git log --pretty=oneline | grep $PARA3 &&
|
||||||
git show $PARA3 | grep "A U Thor" &&
|
git show $PARA3 | grep "A U Thor"
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'fetch branch with replacement' '
|
test_expect_success 'fetch branch with replacement' '
|
||||||
git branch tofetch $HASH6 &&
|
git branch tofetch $HASH6 &&
|
||||||
cd clone_dir &&
|
(cd clone_dir &&
|
||||||
git fetch origin refs/heads/tofetch:refs/heads/parallel3
|
git fetch origin refs/heads/tofetch:refs/heads/parallel3
|
||||||
git log --pretty=oneline parallel3 | grep $PARA3
|
git log --pretty=oneline parallel3 | grep $PARA3
|
||||||
git show $PARA3 | grep "A U Thor"
|
git show $PARA3 | grep "A U Thor"
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'bisect and replacements' '
|
test_expect_success 'bisect and replacements' '
|
||||||
|
@ -413,12 +413,12 @@ test_expect_success 'submodule <invalid-path> warns' '
|
|||||||
|
|
||||||
test_expect_success 'add submodules without specifying an explicit path' '
|
test_expect_success 'add submodules without specifying an explicit path' '
|
||||||
mkdir repo &&
|
mkdir repo &&
|
||||||
cd repo &&
|
(cd repo &&
|
||||||
git init &&
|
git init &&
|
||||||
echo r >r &&
|
echo r >r &&
|
||||||
git add r &&
|
git add r &&
|
||||||
git commit -m "repo commit 1" &&
|
git commit -m "repo commit 1"
|
||||||
cd .. &&
|
) &&
|
||||||
git clone --bare repo/ bare.git &&
|
git clone --bare repo/ bare.git &&
|
||||||
cd addtest &&
|
cd addtest &&
|
||||||
git submodule add "$submodurl/repo" &&
|
git submodule add "$submodurl/repo" &&
|
||||||
|
@ -66,10 +66,10 @@ EOF
|
|||||||
"
|
"
|
||||||
|
|
||||||
commit_file sm1 &&
|
commit_file sm1 &&
|
||||||
cd sm1 &&
|
head3=$(cd sm1 &&
|
||||||
git reset --hard HEAD~2 >/dev/null &&
|
git reset --hard HEAD~2 >/dev/null &&
|
||||||
head3=$(git rev-parse --verify HEAD | cut -c1-7) &&
|
git rev-parse --verify HEAD | cut -c1-7
|
||||||
cd ..
|
)
|
||||||
|
|
||||||
test_expect_success 'modified submodule(backward)' "
|
test_expect_success 'modified submodule(backward)' "
|
||||||
git submodule summary >actual &&
|
git submodule summary >actual &&
|
||||||
|
@ -22,7 +22,7 @@ esac
|
|||||||
test_expect_success \
|
test_expect_success \
|
||||||
'initialize git svn' '
|
'initialize git svn' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
echo foo > foo &&
|
echo foo > foo &&
|
||||||
ln -s foo foo.link
|
ln -s foo foo.link
|
||||||
mkdir -p dir/a/b/c/d/e &&
|
mkdir -p dir/a/b/c/d/e &&
|
||||||
@ -31,8 +31,8 @@ test_expect_success \
|
|||||||
echo "zzz" > bar/zzz &&
|
echo "zzz" > bar/zzz &&
|
||||||
echo "#!/bin/sh" > exec.sh &&
|
echo "#!/bin/sh" > exec.sh &&
|
||||||
chmod +x exec.sh &&
|
chmod +x exec.sh &&
|
||||||
svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null &&
|
svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf import &&
|
rm -rf import &&
|
||||||
git svn init "$svnrepo"'
|
git svn init "$svnrepo"'
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ cd ..
|
|||||||
rm -rf import
|
rm -rf import
|
||||||
test_expect_success 'checkout working copy from svn' 'svn co "$svnrepo" test_wc'
|
test_expect_success 'checkout working copy from svn' 'svn co "$svnrepo" test_wc'
|
||||||
test_expect_success 'setup some commits to svn' \
|
test_expect_success 'setup some commits to svn' \
|
||||||
'cd test_wc &&
|
'(cd test_wc &&
|
||||||
echo Greetings >> kw.c &&
|
echo Greetings >> kw.c &&
|
||||||
poke kw.c &&
|
poke kw.c &&
|
||||||
svn_cmd commit -m "Not yet an Id" &&
|
svn_cmd commit -m "Not yet an Id" &&
|
||||||
@ -63,8 +63,8 @@ test_expect_success 'setup some commits to svn' \
|
|||||||
svn_cmd commit -m "Modified file, but still not yet an Id" &&
|
svn_cmd commit -m "Modified file, but still not yet an Id" &&
|
||||||
svn_cmd propset svn:keywords Id kw.c &&
|
svn_cmd propset svn:keywords Id kw.c &&
|
||||||
poke kw.c &&
|
poke kw.c &&
|
||||||
svn_cmd commit -m "Propset Id" &&
|
svn_cmd commit -m "Propset Id"
|
||||||
cd ..'
|
)'
|
||||||
|
|
||||||
test_expect_success 'initialize git svn' 'git svn init "$svnrepo"'
|
test_expect_success 'initialize git svn' 'git svn init "$svnrepo"'
|
||||||
test_expect_success 'fetch revisions from svn' 'git svn fetch'
|
test_expect_success 'fetch revisions from svn' 'git svn fetch'
|
||||||
@ -82,12 +82,12 @@ got="`sed -ne 2p kw.c`"
|
|||||||
test_expect_success 'raw $Id$ found in kw.c' "test '$expect' = '$got'"
|
test_expect_success 'raw $Id$ found in kw.c' "test '$expect' = '$got'"
|
||||||
|
|
||||||
test_expect_success "propset CR on crlf files" \
|
test_expect_success "propset CR on crlf files" \
|
||||||
'cd test_wc &&
|
'(cd test_wc &&
|
||||||
svn_cmd propset svn:eol-style CR empty &&
|
svn_cmd propset svn:eol-style CR empty &&
|
||||||
svn_cmd propset svn:eol-style CR crlf &&
|
svn_cmd propset svn:eol-style CR crlf &&
|
||||||
svn_cmd propset svn:eol-style CR ne_crlf &&
|
svn_cmd propset svn:eol-style CR ne_crlf &&
|
||||||
svn_cmd commit -m "propset CR on crlf files" &&
|
svn_cmd commit -m "propset CR on crlf files"
|
||||||
cd ..'
|
)'
|
||||||
|
|
||||||
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
|
test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
|
||||||
'git svn fetch &&
|
'git svn fetch &&
|
||||||
@ -137,7 +137,7 @@ cat > show-ignore.expect <<\EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success 'test show-ignore' "
|
test_expect_success 'test show-ignore' "
|
||||||
cd test_wc &&
|
(cd test_wc &&
|
||||||
mkdir -p deeply/nested/directory &&
|
mkdir -p deeply/nested/directory &&
|
||||||
touch deeply/nested/directory/.keep &&
|
touch deeply/nested/directory/.keep &&
|
||||||
svn_cmd add deeply &&
|
svn_cmd add deeply &&
|
||||||
@ -146,7 +146,7 @@ test_expect_success 'test show-ignore' "
|
|||||||
no-such-file*
|
no-such-file*
|
||||||
' .
|
' .
|
||||||
svn_cmd commit -m 'propset svn:ignore'
|
svn_cmd 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
|
cmp show-ignore.expect show-ignore.got
|
||||||
"
|
"
|
||||||
|
@ -4,13 +4,13 @@ test_description='git svn rmdir'
|
|||||||
|
|
||||||
test_expect_success 'initialize repo' '
|
test_expect_success 'initialize repo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
mkdir -p deeply/nested/directory/number/1 &&
|
mkdir -p deeply/nested/directory/number/1 &&
|
||||||
mkdir -p deeply/nested/directory/number/2 &&
|
mkdir -p deeply/nested/directory/number/2 &&
|
||||||
echo foo > deeply/nested/directory/number/1/file &&
|
echo foo > deeply/nested/directory/number/1/file &&
|
||||||
echo foo > deeply/nested/directory/number/2/another &&
|
echo foo > deeply/nested/directory/number/2/another &&
|
||||||
svn_cmd import -m "import for git svn" . "$svnrepo" &&
|
svn_cmd import -m "import for git svn" . "$svnrepo"
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'mirror via git svn' '
|
test_expect_success 'mirror via git svn' '
|
||||||
|
@ -8,13 +8,13 @@ test_description='git svn fetching'
|
|||||||
|
|
||||||
test_expect_success 'initialize repo' '
|
test_expect_success 'initialize repo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
mkdir -p trunk &&
|
mkdir -p trunk &&
|
||||||
echo hello > trunk/readme &&
|
echo hello > trunk/readme &&
|
||||||
svn_cmd import -m "initial" . "$svnrepo" &&
|
svn_cmd import -m "initial" . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
svn_cmd co "$svnrepo" wc &&
|
svn_cmd co "$svnrepo" wc &&
|
||||||
cd wc &&
|
(cd wc &&
|
||||||
echo world >> trunk/readme &&
|
echo world >> trunk/readme &&
|
||||||
poke trunk/readme &&
|
poke trunk/readme &&
|
||||||
svn_cmd commit -m "another commit" &&
|
svn_cmd commit -m "another commit" &&
|
||||||
@ -22,8 +22,8 @@ test_expect_success 'initialize repo' '
|
|||||||
svn_cmd mv trunk thunk &&
|
svn_cmd mv trunk thunk &&
|
||||||
echo goodbye >> thunk/readme &&
|
echo goodbye >> thunk/readme &&
|
||||||
poke thunk/readme &&
|
poke thunk/readme &&
|
||||||
svn_cmd commit -m "bye now" &&
|
svn_cmd commit -m "bye now"
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'init and fetch a moved directory' '
|
test_expect_success 'init and fetch a moved directory' '
|
||||||
@ -85,11 +85,11 @@ test_expect_success 'follow larger parent' '
|
|||||||
test_expect_success 'follow higher-level parent' '
|
test_expect_success 'follow higher-level parent' '
|
||||||
svn mkdir -m "follow higher-level parent" "$svnrepo"/blob &&
|
svn mkdir -m "follow higher-level parent" "$svnrepo"/blob &&
|
||||||
svn co "$svnrepo"/blob blob &&
|
svn co "$svnrepo"/blob blob &&
|
||||||
cd blob &&
|
(cd blob &&
|
||||||
echo hi > hi &&
|
echo hi > hi &&
|
||||||
svn add hi &&
|
svn add hi &&
|
||||||
svn commit -m "hihi" &&
|
svn commit -m "hihi"
|
||||||
cd ..
|
) &&
|
||||||
svn mkdir -m "new glob at top level" "$svnrepo"/glob &&
|
svn mkdir -m "new glob at top level" "$svnrepo"/glob &&
|
||||||
svn mv -m "move blob down a level" "$svnrepo"/blob "$svnrepo"/glob/blob &&
|
svn mv -m "move blob down a level" "$svnrepo"/blob "$svnrepo"/glob/blob &&
|
||||||
git svn init --minimize-url -i blob "$svnrepo"/glob/blob &&
|
git svn init --minimize-url -i blob "$svnrepo"/glob/blob &&
|
||||||
@ -117,18 +117,18 @@ test_expect_success 'follow-parent avoids deleting relevant info' '
|
|||||||
import/trunk/subversion/bindings/swig/perl/t/larger-parent &&
|
import/trunk/subversion/bindings/swig/perl/t/larger-parent &&
|
||||||
echo "bad delete test 2" > \
|
echo "bad delete test 2" > \
|
||||||
import/trunk/subversion/bindings/swig/perl/another-larger &&
|
import/trunk/subversion/bindings/swig/perl/another-larger &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
svn import -m "r9270 test" . "$svnrepo"/r9270 &&
|
svn import -m "r9270 test" . "$svnrepo"/r9270
|
||||||
cd .. &&
|
) &&
|
||||||
svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl r9270 &&
|
svn_cmd co "$svnrepo"/r9270/trunk/subversion/bindings/swig/perl r9270 &&
|
||||||
cd r9270 &&
|
(cd r9270 &&
|
||||||
svn mkdir native &&
|
svn mkdir native &&
|
||||||
svn mv t native/t &&
|
svn mv t native/t &&
|
||||||
for i in a b c; do svn mv $i.pm native/$i.pm; done &&
|
for i in a b c; do svn mv $i.pm native/$i.pm; done &&
|
||||||
echo z >> native/t/c.t &&
|
echo z >> native/t/c.t &&
|
||||||
poke native/t/c.t &&
|
poke native/t/c.t &&
|
||||||
svn commit -m "reorg test" &&
|
svn commit -m "reorg test"
|
||||||
cd .. &&
|
) &&
|
||||||
git svn init --minimize-url -i r9270-t \
|
git svn init --minimize-url -i r9270-t \
|
||||||
"$svnrepo"/r9270/trunk/subversion/bindings/swig/perl/native/t &&
|
"$svnrepo"/r9270/trunk/subversion/bindings/swig/perl/native/t &&
|
||||||
git svn fetch -i r9270-t &&
|
git svn fetch -i r9270-t &&
|
||||||
|
@ -6,10 +6,10 @@ test_description='git svn commit-diff'
|
|||||||
|
|
||||||
test_expect_success 'initialize repo' '
|
test_expect_success 'initialize repo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
echo hello > readme &&
|
echo hello > readme &&
|
||||||
svn_cmd import -m "initial" . "$svnrepo" &&
|
svn_cmd import -m "initial" . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
echo hello > readme &&
|
echo hello > readme &&
|
||||||
git update-index --add readme &&
|
git update-index --add readme &&
|
||||||
git commit -a -m "initial" &&
|
git commit -a -m "initial" &&
|
||||||
|
@ -6,21 +6,21 @@ test_description='git svn commit-diff clobber'
|
|||||||
|
|
||||||
test_expect_success 'initialize repo' '
|
test_expect_success 'initialize repo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
echo initial > file &&
|
echo initial > file &&
|
||||||
svn_cmd import -m "initial" . "$svnrepo" &&
|
svn_cmd import -m "initial" . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
echo initial > file &&
|
echo initial > file &&
|
||||||
git update-index --add file &&
|
git update-index --add file &&
|
||||||
git commit -a -m "initial"
|
git commit -a -m "initial"
|
||||||
'
|
'
|
||||||
test_expect_success 'commit change from svn side' '
|
test_expect_success 'commit change from svn side' '
|
||||||
svn_cmd co "$svnrepo" t.svn &&
|
svn_cmd co "$svnrepo" t.svn &&
|
||||||
cd t.svn &&
|
(cd t.svn &&
|
||||||
echo second line from svn >> file &&
|
echo second line from svn >> file &&
|
||||||
poke file &&
|
poke file &&
|
||||||
svn_cmd commit -m "second line from svn" &&
|
svn_cmd commit -m "second line from svn"
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf t.svn
|
rm -rf t.svn
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -44,11 +44,11 @@ test_expect_success 'dcommit fails to commit because of conflict' '
|
|||||||
git svn fetch &&
|
git svn fetch &&
|
||||||
git reset --hard refs/${remotes_git_svn} &&
|
git reset --hard refs/${remotes_git_svn} &&
|
||||||
svn_cmd co "$svnrepo" t.svn &&
|
svn_cmd co "$svnrepo" t.svn &&
|
||||||
cd t.svn &&
|
(cd t.svn &&
|
||||||
echo fourth line from svn >> file &&
|
echo fourth line from svn >> file &&
|
||||||
poke file &&
|
poke file &&
|
||||||
svn_cmd commit -m "fourth line from svn" &&
|
svn_cmd commit -m "fourth line from svn"
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf t.svn &&
|
rm -rf t.svn &&
|
||||||
echo "fourth line from git" >> file &&
|
echo "fourth line from git" >> file &&
|
||||||
git commit -a -m "fourth line from git" &&
|
git commit -a -m "fourth line from git" &&
|
||||||
@ -68,11 +68,11 @@ test_expect_success 'dcommit does the svn equivalent of an index merge' "
|
|||||||
|
|
||||||
test_expect_success 'commit another change from svn side' '
|
test_expect_success 'commit another change from svn side' '
|
||||||
svn_cmd co "$svnrepo" t.svn &&
|
svn_cmd co "$svnrepo" t.svn &&
|
||||||
cd t.svn &&
|
(cd t.svn &&
|
||||||
echo third line from svn >> file &&
|
echo third line from svn >> file &&
|
||||||
poke file &&
|
poke file &&
|
||||||
svn_cmd commit -m "third line from svn" &&
|
svn_cmd commit -m "third line from svn"
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf t.svn
|
rm -rf t.svn
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@ test_description='git svn metadata migrations from previous versions'
|
|||||||
test_expect_success 'setup old-looking metadata' '
|
test_expect_success 'setup old-looking metadata' '
|
||||||
cp "$GIT_DIR"/config "$GIT_DIR"/config-old-git-svn &&
|
cp "$GIT_DIR"/config "$GIT_DIR"/config-old-git-svn &&
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
for i in trunk branches/a branches/b \
|
for i in trunk branches/a branches/b \
|
||||||
tags/0.1 tags/0.2 tags/0.3; do
|
tags/0.1 tags/0.2 tags/0.3; do
|
||||||
mkdir -p $i && \
|
mkdir -p $i && \
|
||||||
echo hello >> $i/README || exit 1
|
echo hello >> $i/README || exit 1
|
||||||
done && \
|
done && \
|
||||||
svn_cmd import -m test . "$svnrepo"
|
svn_cmd import -m test . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
git svn init "$svnrepo" &&
|
git svn init "$svnrepo" &&
|
||||||
git svn fetch &&
|
git svn fetch &&
|
||||||
rm -rf "$GIT_DIR"/svn &&
|
rm -rf "$GIT_DIR"/svn &&
|
||||||
|
@ -37,11 +37,11 @@ EOF
|
|||||||
test_expect_success 'setup svn repository' '
|
test_expect_success 'setup svn repository' '
|
||||||
svn_cmd co "$svnrepo" mysvnwork &&
|
svn_cmd co "$svnrepo" mysvnwork &&
|
||||||
mkdir -p mysvnwork/trunk &&
|
mkdir -p mysvnwork/trunk &&
|
||||||
cd mysvnwork &&
|
(cd mysvnwork &&
|
||||||
big_text_block >> trunk/README &&
|
big_text_block >> trunk/README &&
|
||||||
svn_cmd add trunk &&
|
svn_cmd add trunk &&
|
||||||
svn_cmd ci -m "first commit" trunk &&
|
svn_cmd ci -m "first commit" trunk
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'setup git mirror and merge' '
|
test_expect_success 'setup git mirror and merge' '
|
||||||
|
@ -61,11 +61,11 @@ test_expect_success 'add a file with plus signs' '
|
|||||||
|
|
||||||
test_expect_success 'clone the repository to test rebase' '
|
test_expect_success 'clone the repository to test rebase' '
|
||||||
git svn clone "$svnrepo" test-rebase &&
|
git svn clone "$svnrepo" test-rebase &&
|
||||||
cd test-rebase &&
|
(cd test-rebase &&
|
||||||
echo test-rebase > test-rebase &&
|
echo test-rebase > test-rebase &&
|
||||||
git add test-rebase &&
|
git add test-rebase &&
|
||||||
git commit -m test-rebase &&
|
git commit -m test-rebase
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'make a commit to test rebase' '
|
test_expect_success 'make a commit to test rebase' '
|
||||||
|
@ -8,14 +8,14 @@ test_description='git svn log tests'
|
|||||||
|
|
||||||
test_expect_success 'setup repository and import' '
|
test_expect_success 'setup repository and import' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
for i in trunk branches/a branches/b \
|
for i in trunk branches/a branches/b \
|
||||||
tags/0.1 tags/0.2 tags/0.3; do
|
tags/0.1 tags/0.2 tags/0.3; do
|
||||||
mkdir -p $i && \
|
mkdir -p $i && \
|
||||||
echo hello >> $i/README || exit 1
|
echo hello >> $i/README || exit 1
|
||||||
done && \
|
done && \
|
||||||
svn_cmd import -m test . "$svnrepo"
|
svn_cmd import -m test . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
git svn init "$svnrepo" -T trunk -b branches -t tags &&
|
git svn init "$svnrepo" -T trunk -b branches -t tags &&
|
||||||
git svn fetch &&
|
git svn fetch &&
|
||||||
git reset --hard trunk &&
|
git reset --hard trunk &&
|
||||||
|
@ -39,27 +39,27 @@ quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/')"
|
|||||||
|
|
||||||
test_expect_success 'setup repository and import' '
|
test_expect_success 'setup repository and import' '
|
||||||
mkdir info &&
|
mkdir info &&
|
||||||
cd info &&
|
(cd info &&
|
||||||
echo FIRST > A &&
|
echo FIRST > A &&
|
||||||
echo one > file &&
|
echo one > file &&
|
||||||
ln -s file symlink-file &&
|
ln -s file symlink-file &&
|
||||||
mkdir directory &&
|
mkdir directory &&
|
||||||
touch directory/.placeholder &&
|
touch directory/.placeholder &&
|
||||||
ln -s directory symlink-directory &&
|
ln -s directory symlink-directory &&
|
||||||
svn_cmd import -m "initial" . "$svnrepo" &&
|
svn_cmd import -m "initial" . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
svn_cmd co "$svnrepo" svnwc &&
|
svn_cmd co "$svnrepo" svnwc &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
echo foo > foo &&
|
echo foo > foo &&
|
||||||
svn_cmd add foo &&
|
svn_cmd add foo &&
|
||||||
svn_cmd commit -m "change outside directory" &&
|
svn_cmd commit -m "change outside directory" &&
|
||||||
svn_cmd update &&
|
svn_cmd update
|
||||||
cd .. &&
|
) &&
|
||||||
mkdir gitwc &&
|
mkdir gitwc &&
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git svn init "$svnrepo" &&
|
git svn init "$svnrepo" &&
|
||||||
git svn fetch &&
|
git svn fetch
|
||||||
cd .. &&
|
) &&
|
||||||
ptouch gitwc/file svnwc/file &&
|
ptouch gitwc/file svnwc/file &&
|
||||||
ptouch gitwc/directory svnwc/directory &&
|
ptouch gitwc/directory svnwc/directory &&
|
||||||
ptouch gitwc/symlink-file svnwc/symlink-file &&
|
ptouch gitwc/symlink-file svnwc/symlink-file &&
|
||||||
@ -138,14 +138,14 @@ test_expect_success 'info --url symlink-directory' '
|
|||||||
|
|
||||||
test_expect_success 'info added-file' "
|
test_expect_success 'info added-file' "
|
||||||
echo two > gitwc/added-file &&
|
echo two > gitwc/added-file &&
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git add added-file &&
|
git add added-file
|
||||||
cd .. &&
|
) &&
|
||||||
cp gitwc/added-file svnwc/added-file &&
|
cp gitwc/added-file svnwc/added-file &&
|
||||||
ptouch gitwc/added-file svnwc/added-file &&
|
ptouch gitwc/added-file svnwc/added-file &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
svn_cmd add added-file > /dev/null &&
|
svn_cmd add added-file > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
(cd svnwc; svn info added-file) > expected.info-added-file &&
|
(cd svnwc; svn info added-file) > expected.info-added-file &&
|
||||||
(cd gitwc; git svn info added-file) > actual.info-added-file &&
|
(cd gitwc; git svn info added-file) > actual.info-added-file &&
|
||||||
test_cmp expected.info-added-file actual.info-added-file
|
test_cmp expected.info-added-file actual.info-added-file
|
||||||
@ -160,12 +160,12 @@ test_expect_success 'info added-directory' "
|
|||||||
mkdir gitwc/added-directory svnwc/added-directory &&
|
mkdir gitwc/added-directory svnwc/added-directory &&
|
||||||
ptouch gitwc/added-directory svnwc/added-directory &&
|
ptouch gitwc/added-directory svnwc/added-directory &&
|
||||||
touch gitwc/added-directory/.placeholder &&
|
touch gitwc/added-directory/.placeholder &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
svn_cmd add added-directory > /dev/null &&
|
svn_cmd add added-directory > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git add added-directory &&
|
git add added-directory
|
||||||
cd .. &&
|
) &&
|
||||||
(cd svnwc; svn info added-directory) \
|
(cd svnwc; svn info added-directory) \
|
||||||
> expected.info-added-directory &&
|
> expected.info-added-directory &&
|
||||||
(cd gitwc; git svn info added-directory) \
|
(cd gitwc; git svn info added-directory) \
|
||||||
@ -179,14 +179,14 @@ test_expect_success 'info --url added-directory' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info added-symlink-file' "
|
test_expect_success 'info added-symlink-file' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
ln -s added-file added-symlink-file &&
|
ln -s added-file added-symlink-file &&
|
||||||
git add added-symlink-file &&
|
git add added-symlink-file
|
||||||
cd .. &&
|
) &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
ln -s added-file added-symlink-file &&
|
ln -s added-file added-symlink-file &&
|
||||||
svn_cmd add added-symlink-file > /dev/null &&
|
svn_cmd add added-symlink-file > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
ptouch gitwc/added-symlink-file svnwc/added-symlink-file &&
|
ptouch gitwc/added-symlink-file svnwc/added-symlink-file &&
|
||||||
(cd svnwc; svn info added-symlink-file) \
|
(cd svnwc; svn info added-symlink-file) \
|
||||||
> expected.info-added-symlink-file &&
|
> expected.info-added-symlink-file &&
|
||||||
@ -202,14 +202,14 @@ test_expect_success 'info --url added-symlink-file' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info added-symlink-directory' "
|
test_expect_success 'info added-symlink-directory' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
ln -s added-directory added-symlink-directory &&
|
ln -s added-directory added-symlink-directory &&
|
||||||
git add added-symlink-directory &&
|
git add added-symlink-directory
|
||||||
cd .. &&
|
) &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
ln -s added-directory added-symlink-directory &&
|
ln -s added-directory added-symlink-directory &&
|
||||||
svn_cmd add added-symlink-directory > /dev/null &&
|
svn_cmd add added-symlink-directory > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
ptouch gitwc/added-symlink-directory svnwc/added-symlink-directory &&
|
ptouch gitwc/added-symlink-directory svnwc/added-symlink-directory &&
|
||||||
(cd svnwc; svn info added-symlink-directory) \
|
(cd svnwc; svn info added-symlink-directory) \
|
||||||
> expected.info-added-symlink-directory &&
|
> expected.info-added-symlink-directory &&
|
||||||
@ -230,12 +230,12 @@ test_expect_success 'info --url added-symlink-directory' '
|
|||||||
# simply reuses the Last Changed Date.
|
# simply reuses the Last Changed Date.
|
||||||
|
|
||||||
test_expect_success 'info deleted-file' "
|
test_expect_success 'info deleted-file' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git rm -f file > /dev/null &&
|
git rm -f file > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
svn_cmd rm --force file > /dev/null &&
|
svn_cmd rm --force file > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
(cd svnwc; svn info file) |
|
(cd svnwc; svn info file) |
|
||||||
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
||||||
> expected.info-deleted-file &&
|
> expected.info-deleted-file &&
|
||||||
@ -251,12 +251,12 @@ test_expect_success 'info --url file (deleted)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info deleted-directory' "
|
test_expect_success 'info deleted-directory' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git rm -r -f directory > /dev/null &&
|
git rm -r -f directory > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
svn_cmd rm --force directory > /dev/null &&
|
svn_cmd rm --force directory > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
(cd svnwc; svn info directory) |
|
(cd svnwc; svn info directory) |
|
||||||
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
||||||
> expected.info-deleted-directory &&
|
> expected.info-deleted-directory &&
|
||||||
@ -272,12 +272,12 @@ test_expect_success 'info --url directory (deleted)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info deleted-symlink-file' "
|
test_expect_success 'info deleted-symlink-file' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git rm -f symlink-file > /dev/null &&
|
git rm -f symlink-file > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
svn_cmd rm --force symlink-file > /dev/null &&
|
svn_cmd rm --force symlink-file > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
(cd svnwc; svn info symlink-file) |
|
(cd svnwc; svn info symlink-file) |
|
||||||
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
||||||
> expected.info-deleted-symlink-file &&
|
> expected.info-deleted-symlink-file &&
|
||||||
@ -294,12 +294,12 @@ test_expect_success 'info --url symlink-file (deleted)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info deleted-symlink-directory' "
|
test_expect_success 'info deleted-symlink-directory' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
git rm -f symlink-directory > /dev/null &&
|
git rm -f symlink-directory > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
cd svnwc &&
|
(cd svnwc &&
|
||||||
svn_cmd rm --force symlink-directory > /dev/null &&
|
svn_cmd rm --force symlink-directory > /dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
(cd svnwc; svn info symlink-directory) |
|
(cd svnwc; svn info symlink-directory) |
|
||||||
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
|
||||||
> expected.info-deleted-symlink-directory &&
|
> expected.info-deleted-symlink-directory &&
|
||||||
@ -346,9 +346,9 @@ test_expect_success 'info --url unknown-directory' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info unknown-symlink-file' "
|
test_expect_success 'info unknown-symlink-file' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
ln -s unknown-file unknown-symlink-file &&
|
ln -s unknown-file unknown-symlink-file
|
||||||
cd .. &&
|
) &&
|
||||||
(cd gitwc; test_must_fail git svn info unknown-symlink-file) \
|
(cd gitwc; test_must_fail git svn info unknown-symlink-file) \
|
||||||
2> actual.info-unknown-symlink-file &&
|
2> actual.info-unknown-symlink-file &&
|
||||||
grep unknown-symlink-file actual.info-unknown-symlink-file
|
grep unknown-symlink-file actual.info-unknown-symlink-file
|
||||||
@ -361,9 +361,9 @@ test_expect_success 'info --url unknown-symlink-file' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'info unknown-symlink-directory' "
|
test_expect_success 'info unknown-symlink-directory' "
|
||||||
cd gitwc &&
|
(cd gitwc &&
|
||||||
ln -s unknown-directory unknown-symlink-directory &&
|
ln -s unknown-directory unknown-symlink-directory
|
||||||
cd .. &&
|
) &&
|
||||||
(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \
|
(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \
|
||||||
2> actual.info-unknown-symlink-directory &&
|
2> actual.info-unknown-symlink-directory &&
|
||||||
grep unknown-symlink-directory actual.info-unknown-symlink-directory
|
grep unknown-symlink-directory actual.info-unknown-symlink-directory
|
||||||
|
@ -20,9 +20,9 @@ test_expect_success 'setup svnrepo' '
|
|||||||
|
|
||||||
test_expect_success 'test clone with percent escapes' '
|
test_expect_success 'test clone with percent escapes' '
|
||||||
git svn clone "$svnrepo/pr%20ject" clone &&
|
git svn clone "$svnrepo/pr%20ject" clone &&
|
||||||
cd clone &&
|
(cd clone &&
|
||||||
git rev-parse refs/${remotes_git_svn} &&
|
git rev-parse refs/${remotes_git_svn}
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
# SVN works either way, so should we...
|
# SVN works either way, so should we...
|
||||||
|
@ -8,10 +8,10 @@ test_description='git svn respects rewriteRoot during rebuild'
|
|||||||
. ./lib-git-svn.sh
|
. ./lib-git-svn.sh
|
||||||
|
|
||||||
mkdir import
|
mkdir import
|
||||||
cd import
|
(cd import
|
||||||
touch foo
|
touch foo
|
||||||
svn_cmd import -m 'import for git svn' . "$svnrepo" >/dev/null
|
svn_cmd import -m 'import for git svn' . "$svnrepo" >/dev/null
|
||||||
cd ..
|
)
|
||||||
rm -rf import
|
rm -rf import
|
||||||
|
|
||||||
test_expect_success 'init, fetch and checkout repository' '
|
test_expect_success 'init, fetch and checkout repository' '
|
||||||
|
@ -19,19 +19,19 @@ test_expect_success 'setup svnrepo' '
|
|||||||
test_expect_success 'test clone with multi-glob in branch names' '
|
test_expect_success 'test clone with multi-glob in branch names' '
|
||||||
git svn clone -T trunk -b branches/*/* -t tags \
|
git svn clone -T trunk -b branches/*/* -t tags \
|
||||||
"$svnrepo/project" project &&
|
"$svnrepo/project" project &&
|
||||||
cd project &&
|
(cd project &&
|
||||||
git rev-parse "refs/remotes/v14.1/beta" &&
|
git rev-parse "refs/remotes/v14.1/beta" &&
|
||||||
git rev-parse "refs/remotes/v14.1/gold" &&
|
git rev-parse "refs/remotes/v14.1/gold"
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'test dcommit to multi-globbed branch' "
|
test_expect_success 'test dcommit to multi-globbed branch' "
|
||||||
cd project &&
|
(cd project &&
|
||||||
git reset --hard 'refs/remotes/v14.1/gold' &&
|
git reset --hard 'refs/remotes/v14.1/gold' &&
|
||||||
echo hello >> foo &&
|
echo hello >> foo &&
|
||||||
git commit -m 'hello' -- foo &&
|
git commit -m 'hello' -- foo &&
|
||||||
git svn dcommit &&
|
git svn dcommit
|
||||||
cd ..
|
)
|
||||||
"
|
"
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -9,27 +9,27 @@ test_description='git svn partial-rebuild tests'
|
|||||||
test_expect_success 'initialize svnrepo' '
|
test_expect_success 'initialize svnrepo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
(
|
(
|
||||||
cd import &&
|
(cd import &&
|
||||||
mkdir trunk branches tags &&
|
mkdir trunk branches tags &&
|
||||||
cd trunk &&
|
(cd trunk &&
|
||||||
echo foo > foo &&
|
echo foo > foo
|
||||||
cd .. &&
|
) &&
|
||||||
svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null &&
|
svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null &&
|
||||||
svn_cmd copy "$svnrepo"/trunk "$svnrepo"/branches/a \
|
svn_cmd copy "$svnrepo"/trunk "$svnrepo"/branches/a \
|
||||||
-m "created branch a" &&
|
-m "created branch a"
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf import &&
|
rm -rf import &&
|
||||||
svn_cmd co "$svnrepo"/trunk trunk &&
|
svn_cmd co "$svnrepo"/trunk trunk &&
|
||||||
cd trunk &&
|
(cd trunk &&
|
||||||
echo bar >> foo &&
|
echo bar >> foo &&
|
||||||
svn_cmd ci -m "updated trunk" &&
|
svn_cmd ci -m "updated trunk"
|
||||||
cd .. &&
|
) &&
|
||||||
svn_cmd co "$svnrepo"/branches/a a &&
|
svn_cmd co "$svnrepo"/branches/a a &&
|
||||||
cd a &&
|
(cd a &&
|
||||||
echo baz >> a &&
|
echo baz >> a &&
|
||||||
svn_cmd add a &&
|
svn_cmd add a &&
|
||||||
svn_cmd ci -m "updated a" &&
|
svn_cmd ci -m "updated a"
|
||||||
cd .. &&
|
) &&
|
||||||
git svn init --stdlayout "$svnrepo"
|
git svn init --stdlayout "$svnrepo"
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
@ -41,11 +41,11 @@ test_expect_success 'import an early SVN revision into git' '
|
|||||||
test_expect_success 'make full git mirror of SVN' '
|
test_expect_success 'make full git mirror of SVN' '
|
||||||
mkdir mirror &&
|
mkdir mirror &&
|
||||||
(
|
(
|
||||||
cd mirror &&
|
(cd mirror &&
|
||||||
git init &&
|
git init &&
|
||||||
git svn init --stdlayout "$svnrepo" &&
|
git svn init --stdlayout "$svnrepo" &&
|
||||||
git svn fetch &&
|
git svn fetch
|
||||||
cd ..
|
)
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -9,19 +9,19 @@ test_description='git svn partial-rebuild tests'
|
|||||||
test_expect_success 'initialize svnrepo' '
|
test_expect_success 'initialize svnrepo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
(
|
(
|
||||||
cd import &&
|
(cd import &&
|
||||||
mkdir trunk branches tags &&
|
mkdir trunk branches tags &&
|
||||||
cd trunk &&
|
(cd trunk &&
|
||||||
echo foo > foo &&
|
echo foo > foo
|
||||||
cd .. &&
|
) &&
|
||||||
svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null &&
|
svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf import &&
|
rm -rf import &&
|
||||||
svn_cmd co "$svnrepo"/trunk trunk &&
|
svn_cmd co "$svnrepo"/trunk trunk &&
|
||||||
cd trunk &&
|
(cd trunk &&
|
||||||
echo bar >> foo &&
|
echo bar >> foo &&
|
||||||
svn_cmd ci -m "updated trunk" &&
|
svn_cmd ci -m "updated trunk"
|
||||||
cd .. &&
|
) &&
|
||||||
rm -rf trunk
|
rm -rf trunk
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
@ -6,10 +6,10 @@ test_description='git svn dcommit clobber series'
|
|||||||
|
|
||||||
test_expect_success 'initialize repo' '
|
test_expect_success 'initialize repo' '
|
||||||
mkdir import &&
|
mkdir import &&
|
||||||
cd import &&
|
(cd import &&
|
||||||
awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file
|
awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file
|
||||||
svn_cmd import -m "initial" . "$svnrepo" &&
|
svn_cmd import -m "initial" . "$svnrepo"
|
||||||
cd .. &&
|
) &&
|
||||||
git svn init "$svnrepo" &&
|
git svn init "$svnrepo" &&
|
||||||
git svn fetch &&
|
git svn fetch &&
|
||||||
test -e file
|
test -e file
|
||||||
@ -19,14 +19,14 @@ test_expect_success '(supposedly) non-conflicting change from SVN' '
|
|||||||
test x"`sed -n -e 58p < file`" = x58 &&
|
test x"`sed -n -e 58p < file`" = x58 &&
|
||||||
test x"`sed -n -e 61p < file`" = x61 &&
|
test x"`sed -n -e 61p < file`" = x61 &&
|
||||||
svn_cmd co "$svnrepo" tmp &&
|
svn_cmd co "$svnrepo" tmp &&
|
||||||
cd tmp &&
|
(cd tmp &&
|
||||||
perl -i.bak -p -e "s/^58$/5588/" file &&
|
perl -i.bak -p -e "s/^58$/5588/" file &&
|
||||||
perl -i.bak -p -e "s/^61$/6611/" file &&
|
perl -i.bak -p -e "s/^61$/6611/" file &&
|
||||||
poke file &&
|
poke file &&
|
||||||
test x"`sed -n -e 58p < file`" = x5588 &&
|
test x"`sed -n -e 58p < file`" = x5588 &&
|
||||||
test x"`sed -n -e 61p < file`" = x6611 &&
|
test x"`sed -n -e 61p < file`" = x6611 &&
|
||||||
svn_cmd commit -m "58 => 5588, 61 => 6611" &&
|
svn_cmd commit -m "58 => 5588, 61 => 6611"
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'some unrelated changes to git' "
|
test_expect_success 'some unrelated changes to git' "
|
||||||
|
@ -1056,11 +1056,10 @@ test_expect_success \
|
|||||||
'P: supermodule & submodule mix' \
|
'P: supermodule & submodule mix' \
|
||||||
'git fast-import <input &&
|
'git fast-import <input &&
|
||||||
git checkout subuse1 &&
|
git checkout subuse1 &&
|
||||||
rm -rf sub && mkdir sub && cd sub &&
|
rm -rf sub && mkdir sub && (cd sub &&
|
||||||
git init &&
|
git init &&
|
||||||
git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
|
git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
|
||||||
git checkout master &&
|
git checkout master) &&
|
||||||
cd .. &&
|
|
||||||
git submodule init &&
|
git submodule init &&
|
||||||
git submodule update'
|
git submodule update'
|
||||||
|
|
||||||
|
@ -129,21 +129,22 @@ test_expect_success 'cvs co (use attributes)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'adding files' '
|
test_expect_success 'adding files' '
|
||||||
cd cvswork/subdir &&
|
(cd cvswork &&
|
||||||
|
(cd subdir &&
|
||||||
echo "more text" > src.c &&
|
echo "more text" > src.c &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q add src.c >cvs.log 2>&1 &&
|
GIT_CONFIG="$git_config" cvs -Q add src.c >cvs.log 2>&1 &&
|
||||||
marked_as . src.c "" &&
|
marked_as . src.c "" &&
|
||||||
echo "psuedo-binary" > temp.bin &&
|
echo "psuedo-binary" > temp.bin
|
||||||
cd .. &&
|
) &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q add subdir/temp.bin >cvs.log 2>&1 &&
|
GIT_CONFIG="$git_config" cvs -Q add subdir/temp.bin >cvs.log 2>&1 &&
|
||||||
marked_as subdir temp.bin "-kb" &&
|
marked_as subdir temp.bin "-kb" &&
|
||||||
cd subdir &&
|
cd subdir &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q ci -m "adding files" >cvs.log 2>&1 &&
|
GIT_CONFIG="$git_config" cvs -Q ci -m "adding files" >cvs.log 2>&1 &&
|
||||||
marked_as . temp.bin "-kb" &&
|
marked_as . temp.bin "-kb" &&
|
||||||
marked_as . src.c ""
|
marked_as . src.c ""
|
||||||
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
cd "$WORKDIR"
|
|
||||||
test_expect_success 'updating' '
|
test_expect_success 'updating' '
|
||||||
git pull gitcvs.git &&
|
git pull gitcvs.git &&
|
||||||
echo 'hi' > subdir/newfile.bin &&
|
echo 'hi' > subdir/newfile.bin &&
|
||||||
@ -153,9 +154,9 @@ test_expect_success 'updating' '
|
|||||||
git add subdir/newfile.bin subdir/file.h subdir/newfile.c binfile.bin &&
|
git add subdir/newfile.bin subdir/file.h subdir/newfile.c binfile.bin &&
|
||||||
git commit -q -m "Add and change some files" &&
|
git commit -q -m "Add and change some files" &&
|
||||||
git push gitcvs.git >/dev/null &&
|
git push gitcvs.git >/dev/null &&
|
||||||
cd cvswork &&
|
(cd cvswork &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q update &&
|
GIT_CONFIG="$git_config" cvs -Q update
|
||||||
cd .. &&
|
) &&
|
||||||
marked_as cvswork textfile.c "" &&
|
marked_as cvswork textfile.c "" &&
|
||||||
marked_as cvswork binfile.bin -kb &&
|
marked_as cvswork binfile.bin -kb &&
|
||||||
marked_as cvswork .gitattributes "" &&
|
marked_as cvswork .gitattributes "" &&
|
||||||
@ -233,35 +234,35 @@ test_expect_success 'cvs co another copy (guess)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'add text (guess)' '
|
test_expect_success 'add text (guess)' '
|
||||||
cd cvswork &&
|
(cd cvswork &&
|
||||||
echo "simpleText" > simpleText.c &&
|
echo "simpleText" > simpleText.c &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q add simpleText.c &&
|
GIT_CONFIG="$git_config" cvs -Q add simpleText.c
|
||||||
cd .. &&
|
) &&
|
||||||
marked_as cvswork simpleText.c ""
|
marked_as cvswork simpleText.c ""
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'add bin (guess)' '
|
test_expect_success 'add bin (guess)' '
|
||||||
cd cvswork &&
|
(cd cvswork &&
|
||||||
echo "simpleBin: NUL: Q <- there" | q_to_nul > simpleBin.bin &&
|
echo "simpleBin: NUL: Q <- there" | q_to_nul > simpleBin.bin &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q add simpleBin.bin &&
|
GIT_CONFIG="$git_config" cvs -Q add simpleBin.bin
|
||||||
cd .. &&
|
) &&
|
||||||
marked_as cvswork simpleBin.bin -kb
|
marked_as cvswork simpleBin.bin -kb
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'remove files (guess)' '
|
test_expect_success 'remove files (guess)' '
|
||||||
cd cvswork &&
|
(cd cvswork &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q rm -f subdir/file.h &&
|
GIT_CONFIG="$git_config" cvs -Q rm -f subdir/file.h &&
|
||||||
cd subdir &&
|
(cd subdir &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q rm -f withCr.bin &&
|
GIT_CONFIG="$git_config" cvs -Q rm -f withCr.bin
|
||||||
cd ../.. &&
|
)) &&
|
||||||
marked_as cvswork/subdir withCr.bin -kb &&
|
marked_as cvswork/subdir withCr.bin -kb &&
|
||||||
marked_as cvswork/subdir file.h ""
|
marked_as cvswork/subdir file.h ""
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'cvs ci (guess)' '
|
test_expect_success 'cvs ci (guess)' '
|
||||||
cd cvswork &&
|
(cd cvswork &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q ci -m "add/rm files" >cvs.log 2>&1 &&
|
GIT_CONFIG="$git_config" cvs -Q ci -m "add/rm files" >cvs.log 2>&1
|
||||||
cd .. &&
|
) &&
|
||||||
marked_as cvswork textfile.c "" &&
|
marked_as cvswork textfile.c "" &&
|
||||||
marked_as cvswork binfile.bin -kb &&
|
marked_as cvswork binfile.bin -kb &&
|
||||||
marked_as cvswork .gitattributes "" &&
|
marked_as cvswork .gitattributes "" &&
|
||||||
@ -278,9 +279,9 @@ test_expect_success 'cvs ci (guess)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'update subdir of other copy (guess)' '
|
test_expect_success 'update subdir of other copy (guess)' '
|
||||||
cd cvswork2/subdir &&
|
(cd cvswork2/subdir &&
|
||||||
GIT_CONFIG="$git_config" cvs -Q update &&
|
GIT_CONFIG="$git_config" cvs -Q update
|
||||||
cd ../.. &&
|
) &&
|
||||||
marked_as cvswork2 textfile.c "" &&
|
marked_as cvswork2 textfile.c "" &&
|
||||||
marked_as cvswork2 binfile.bin -kb &&
|
marked_as cvswork2 binfile.bin -kb &&
|
||||||
marked_as cvswork2 .gitattributes "" &&
|
marked_as cvswork2 .gitattributes "" &&
|
||||||
@ -304,11 +305,11 @@ test_expect_success 'update/merge full other copy (guess)' '
|
|||||||
git add multilineTxt.c &&
|
git add multilineTxt.c &&
|
||||||
git commit -q -m "modify multiline file" >> "${WORKDIR}/marked.log" &&
|
git commit -q -m "modify multiline file" >> "${WORKDIR}/marked.log" &&
|
||||||
git push gitcvs.git >/dev/null &&
|
git push gitcvs.git >/dev/null &&
|
||||||
cd cvswork2 &&
|
(cd cvswork2 &&
|
||||||
sed "s/1/replaced_1/" < multilineTxt.c > ml.temp &&
|
sed "s/1/replaced_1/" < multilineTxt.c > ml.temp &&
|
||||||
mv ml.temp multilineTxt.c &&
|
mv ml.temp multilineTxt.c &&
|
||||||
GIT_CONFIG="$git_config" cvs update > cvs.log 2>&1 &&
|
GIT_CONFIG="$git_config" cvs update > cvs.log 2>&1
|
||||||
cd .. &&
|
) &&
|
||||||
marked_as cvswork2 textfile.c "" &&
|
marked_as cvswork2 textfile.c "" &&
|
||||||
marked_as cvswork2 binfile.bin -kb &&
|
marked_as cvswork2 binfile.bin -kb &&
|
||||||
marked_as cvswork2 .gitattributes "" &&
|
marked_as cvswork2 .gitattributes "" &&
|
||||||
|
@ -17,7 +17,7 @@ test_expect_success 'setup a cvs module' '
|
|||||||
|
|
||||||
mkdir "$CVSROOT/module" &&
|
mkdir "$CVSROOT/module" &&
|
||||||
$CVS co -d module-cvs module &&
|
$CVS co -d module-cvs module &&
|
||||||
cd module-cvs &&
|
(cd module-cvs &&
|
||||||
cat <<EOF >o_fortuna &&
|
cat <<EOF >o_fortuna &&
|
||||||
O Fortuna
|
O Fortuna
|
||||||
velut luna
|
velut luna
|
||||||
@ -41,8 +41,8 @@ add "O Fortuna" lyrics
|
|||||||
|
|
||||||
These public domain lyrics make an excellent sample text.
|
These public domain lyrics make an excellent sample text.
|
||||||
EOF
|
EOF
|
||||||
$CVS commit -F message &&
|
$CVS commit -F message
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'import a trivial module' '
|
test_expect_success 'import a trivial module' '
|
||||||
@ -52,7 +52,7 @@ test_expect_success 'import a trivial module' '
|
|||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'pack refs' 'cd module-git && git gc && cd ..'
|
test_expect_success 'pack refs' '(cd module-git && git gc)'
|
||||||
|
|
||||||
test_expect_success 'initial import has correct .git/cvs-revisions' '
|
test_expect_success 'initial import has correct .git/cvs-revisions' '
|
||||||
|
|
||||||
@ -62,8 +62,7 @@ test_expect_success 'initial import has correct .git/cvs-revisions' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'update cvs module' '
|
test_expect_success 'update cvs module' '
|
||||||
|
(cd module-cvs &&
|
||||||
cd module-cvs &&
|
|
||||||
cat <<EOF >o_fortuna &&
|
cat <<EOF >o_fortuna &&
|
||||||
O Fortune,
|
O Fortune,
|
||||||
like the moon
|
like the moon
|
||||||
@ -86,16 +85,16 @@ translate to English
|
|||||||
|
|
||||||
My Latin is terrible.
|
My Latin is terrible.
|
||||||
EOF
|
EOF
|
||||||
$CVS commit -F message &&
|
$CVS commit -F message
|
||||||
cd ..
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'update git module' '
|
test_expect_success 'update git module' '
|
||||||
|
|
||||||
cd module-git &&
|
(cd module-git &&
|
||||||
git cvsimport -a -R -z 0 module &&
|
git cvsimport -a -R -z 0 module &&
|
||||||
git merge origin &&
|
git merge origin
|
||||||
cd .. &&
|
) &&
|
||||||
test_cmp module-cvs/o_fortuna module-git/o_fortuna
|
test_cmp module-cvs/o_fortuna module-git/o_fortuna
|
||||||
|
|
||||||
'
|
'
|
||||||
@ -110,21 +109,20 @@ test_expect_success 'update has correct .git/cvs-revisions' '
|
|||||||
|
|
||||||
test_expect_success 'update cvs module' '
|
test_expect_success 'update cvs module' '
|
||||||
|
|
||||||
cd module-cvs &&
|
(cd module-cvs &&
|
||||||
echo 1 >tick &&
|
echo 1 >tick &&
|
||||||
$CVS add tick &&
|
$CVS add tick &&
|
||||||
$CVS commit -m 1
|
$CVS commit -m 1
|
||||||
cd ..
|
)
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'cvsimport.module config works' '
|
test_expect_success 'cvsimport.module config works' '
|
||||||
|
|
||||||
cd module-git &&
|
(cd module-git &&
|
||||||
git config cvsimport.module module &&
|
git config cvsimport.module module &&
|
||||||
git cvsimport -a -R -z0 &&
|
git cvsimport -a -R -z0 &&
|
||||||
git merge origin &&
|
git merge origin
|
||||||
cd .. &&
|
) &&
|
||||||
test_cmp module-cvs/tick module-git/tick
|
test_cmp module-cvs/tick module-git/tick
|
||||||
|
|
||||||
'
|
'
|
||||||
@ -141,12 +139,12 @@ test_expect_success 'second update has correct .git/cvs-revisions' '
|
|||||||
test_expect_success 'import from a CVS working tree' '
|
test_expect_success 'import from a CVS working tree' '
|
||||||
|
|
||||||
$CVS co -d import-from-wt module &&
|
$CVS co -d import-from-wt module &&
|
||||||
cd import-from-wt &&
|
(cd import-from-wt &&
|
||||||
git cvsimport -a -z0 &&
|
git cvsimport -a -z0 &&
|
||||||
echo 1 >expect &&
|
echo 1 >expect &&
|
||||||
git log -1 --pretty=format:%s%n >actual &&
|
git log -1 --pretty=format:%s%n >actual &&
|
||||||
test_cmp actual expect &&
|
test_cmp actual expect
|
||||||
cd ..
|
)
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -20,12 +20,12 @@ export CVSROOT
|
|||||||
test_expect_failure 'import with criss cross times on revisions' '
|
test_expect_failure 'import with criss cross times on revisions' '
|
||||||
|
|
||||||
git cvsimport -p"-x" -C module-git module &&
|
git cvsimport -p"-x" -C module-git module &&
|
||||||
cd module-git &&
|
(cd module-git &&
|
||||||
git log --pretty=format:%s > ../actual-master &&
|
git log --pretty=format:%s > ../actual-master &&
|
||||||
git log A~2..A --pretty="format:%s %ad" -- > ../actual-A &&
|
git log A~2..A --pretty="format:%s %ad" -- > ../actual-A &&
|
||||||
echo "" >> ../actual-master &&
|
echo "" >> ../actual-master &&
|
||||||
echo "" >> ../actual-A &&
|
echo "" >> ../actual-A
|
||||||
cd .. &&
|
) &&
|
||||||
echo "Rev 4
|
echo "Rev 4
|
||||||
Rev 3
|
Rev 3
|
||||||
Rev 2
|
Rev 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user