mirror of
https://github.com/git/git.git
synced 2024-11-20 11:43:58 +01:00
8b8fc06824
Bugs fixed: * We didn't allow manually (not using git-svn) init-ed remotes/fetch refspecs to be used before. It works now because that's what I did in this test. git-svn init should offer more control in the future. * correctly strip paths in the delta editor when using do_switch(). * Make the -i / GIT_SVN_ID option work correctly when doing fetch on a multi-ref svn-remote Signed-off-by: Eric Wong <normalperson@yhbt.net>
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2006 Eric Wong
|
|
#
|
|
|
|
test_description='git-svn --follow-parent fetching'
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'initialize repo' "
|
|
mkdir import &&
|
|
cd import &&
|
|
mkdir -p trunk &&
|
|
echo hello > trunk/readme &&
|
|
svn import -m 'initial' . $svnrepo &&
|
|
cd .. &&
|
|
svn co $svnrepo wc &&
|
|
cd wc &&
|
|
echo world >> trunk/readme &&
|
|
poke trunk/readme &&
|
|
svn commit -m 'another commit' &&
|
|
svn up &&
|
|
svn mv -m 'rename to thunk' trunk thunk &&
|
|
svn up &&
|
|
echo goodbye >> thunk/readme &&
|
|
poke thunk/readme &&
|
|
svn commit -m 'bye now' &&
|
|
cd ..
|
|
"
|
|
|
|
test_expect_success 'init and fetch --follow-parent a moved directory' "
|
|
git-svn init -i thunk $svnrepo/thunk &&
|
|
git-svn fetch --follow-parent -i thunk &&
|
|
test \"\`git-rev-parse --verify refs/remotes/trunk\`\" \
|
|
= \"\`git-rev-parse --verify refs/remotes/thunk~1\`\" &&
|
|
test \"\`git-cat-file blob refs/remotes/thunk:readme |\
|
|
sed -n -e '3p'\`\" = goodbye
|
|
"
|
|
|
|
test_expect_success 'init and fetch from one svn-remote' "
|
|
git-repo-config svn-remote.git-svn.url $svnrepo &&
|
|
git-repo-config --add svn-remote.git-svn.fetch \
|
|
trunk:refs/remotes/svn/trunk &&
|
|
git-repo-config --add svn-remote.git-svn.fetch \
|
|
thunk:refs/remotes/svn/thunk &&
|
|
git-svn fetch --follow-parent -i svn/thunk &&
|
|
test \"\`git-rev-parse --verify refs/remotes/svn/trunk\`\" \
|
|
= \"\`git-rev-parse --verify refs/remotes/svn/thunk~1\`\" &&
|
|
test \"\`git-cat-file blob refs/remotes/svn/thunk:readme |\
|
|
sed -n -e '3p'\`\" = goodbye
|
|
"
|
|
|
|
test_debug 'gitk --all &'
|
|
|
|
test_done
|